login
Header Space

 
 

Re: [PATCH] eCryptfs: Privileged kthread for lower file opens

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Michael Halcrow <mhalcrow@...>
Cc: <linux-kernel@...>, <prussell@...>, <shaggy@...>, <sergeh@...>
Date: Wednesday, May 21, 2008 - 6:59 pm

On Tue, 20 May 2008 16:46:10 -0500
Michael Halcrow <mhalcrow@us.ibm.com> wrote:


hm, interesting.  A bit scary though.


This can be made static to fs/ecryptfs/kthread.c.


I think this guy can be made static too.  As a result of which, entire
data structure definitions could possibly be pushed down into
kthread.c?


"hence" ;)


A plain old `return 0;' will suffice here, and is more typical.  I'm
moderately surprised that do_exit() is exported to modules, actually.


kthread_run() does the kthread_create() and the wake_up_process() for you.


eh?  We attach a local variable to a global list and then return?  That
won't last very long.


Did we just leak the dentry_open() result?


ditto.


This looks racy to me.  I assume we're waiting for ecryptfs_kthread to
wake us up.  But that thread could have sent us its wakeup _before_ we
did the set_current_state+schedule.  In which case we lost the wakeup
and we'll get stuck.


This is unneeded.  schedule() always returns in state TASK_RUNNING.


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] eCryptfs: Privileged kthread for lower file opens, Michael Halcrow, (Tue May 20, 5:46 pm)
Re: [PATCH] eCryptfs: Privileged kthread for lower file opens, Andrew Morton, (Wed May 21, 6:59 pm)
[PATCH] eCryptfs: Clean up kthread synchronization, Michael Halcrow, (Thu May 22, 3:31 pm)
Re: [PATCH] eCryptfs: Clean up kthread synchronization, Andrew Morton, (Thu May 22, 3:41 pm)
Re: [PATCH] eCryptfs: Clean up kthread synchronization, Michael Halcrow, (Thu May 22, 5:16 pm)
Re: [PATCH] eCryptfs: Clean up kthread synchronization, Andrew Morton, (Thu May 22, 6:03 pm)
Re: [PATCH] eCryptfs: Privileged kthread for lower file opens, Michael Halcrow, (Wed May 21, 11:14 am)
[PATCH] eCryptfs: Remove useless lock, Michael Halcrow, (Wed May 21, 11:39 am)
speck-geostationary