Messages in this thread | | | Date | Tue, 2 Jun 2009 08:59:23 -0500 | From | "Serge E. Hallyn" <> | Subject | Re: [PATCH 1/5] Move sleeping operations to outside the semaphore. |
| |
Quoting Tetsuo Handa (penguin-kernel@i-love.sakura.ne.jp): > TOMOYO is using rw_semaphore for protecting list elements. > But TOMOYO is doing operations which might sleep inside down_write(). > This patch makes TOMOYO's sleeping operations go outside down_write(). > > Signed-off-by: Kentaro Takeda <takedakn@nttdata.co.jp> > Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> > Signed-off-by: Toshiharu Harada <haradats@nttdata.co.jp>
The overall approach (repeated in each stanza) seems safe enough. Since there are 3 signed-off-by's, I'll assume you've each studied each one to make sure there are no little little oopses (i.e. kfreeing the wrong thing or leaking). So how about for now I'll give
Acked-by: Serge Hallyn <serue@us.ibm.com>
and when you send a patch with more documentation on Tomoyo, I will start looking through the locking in more detail and try to send some patches to standardize it.
Part of why I want to ack this one is it switches to at least normal kmallocs. Frankly I'd prefer to skip the rest of the patchset for now. Patch 2's been nacked, patch 3 is a lot of churn for little gain - when a far better patch woudl be one switching to seq_files. Patch 4 could in fact be a useful step, I think. Patch 5 adds a whole slew of lists that I still don't like - I'd rather just see a simple patch that adds refcounting and doesn't do GC yet.
I personally think trying to add GC before standardizing the locking and refcounting is a bad bad idea.
thanks, -serge
| |