Skip to contentSkip to conversation

JFFS: drop kernel lock on exit from garbage collecting thread

PATCH New Sergei Shtylylov 1 participant 1 message Oct 28, 2005 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 JFFS: drop kernel lock on exit from garbage collecting thread

Hello.

JFFS forgets to drop a kernel lock it grabs in the garbage collecting
thread when that thread is killed by jffs_put_user(). This causes a couple of BUG messages and a call trace to be printed out on unmounting JFFS with the alternate spinlock implemetation which checks for the kernel lock state consistency...

WBR, Sergei

Index: fs/jffs/intrep.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs/intrep.c,v
retrieving revision 1.105

jffs/intrep.c +1 -0
diff -a -u -p -r1.105 intrep.c
@@ -3442,6 +3442,7 @@ jffs_garbage_collect_thread(void *ptr)
 			case SIGKILL:
 				D1(printk("jffs_garbage_collect_thread(): SIGKILL received.\n"));
 				c->gc_task = NULL;
+				unlock_kernel();
 				complete_and_exit(&c->gc_thread_comp, 0);
 			}
 		}