The following seems to fix it, but I need to exercise this a bit more to be 100% certain it is rock solid:
diff --git a/fs/fs_struct.c b/fs/fs_struct.c index 7dca743..cd7175e2 100644 --- a/fs/fs_struct.c +++ b/fs/fs_struct.c @@ -98,8 +98,10 @@ void exit_fs(struct task_struct *tsk) int kill; task_lock(tsk); spin_lock(&fs->lock); + rcu_read_lock(); tsk->fs = NULL; kill = !--fs->users; + rcu_read_unlock(); spin_unlock(&fs->lock); task_unlock(tsk); if (kill)
The following seems to fix it, but I need to exercise this a bit more to be 100% certain it is rock solid:
diff --git a/fs/fs_struct.c b/fs/fs_struct.c
task_ lock(tsk) ;
spin_ lock(&fs- >lock);
tsk-> fs = NULL;
kill = !--fs->users;
spin_ unlock( &fs->lock) ;
task_ unlock( tsk);
index 7dca743..cd7175e2 100644
--- a/fs/fs_struct.c
+++ b/fs/fs_struct.c
@@ -98,8 +98,10 @@ void exit_fs(struct task_struct *tsk)
int kill;
+ rcu_read_lock();
+ rcu_read_unlock();
if (kill)