Messages in this thread | | | Date | Sat, 31 Dec 2005 01:58:45 -0500 (EST) | From | Steven Rostedt <> | Subject | Re: [PATCH] protect remove_proc_entry |
| |
On Fri, 30 Dec 2005, Andrew Morton wrote:
> Steven Rostedt <rostedt@goodmis.org> wrote: > > > > +static DEFINE_SPINLOCK(remove_proc_lock); > > > > I'll take a closer look at this next week. > > The official way of protecting the contents of a directory from concurrent > lookup or modification is to take its i_sem. But procfs is totally weird > and that approach may well not be practical here. We'd certainly prefer > not to rely upon lock_kernel(). >
Yeah, I thought about using the sem (or mutex ;) but remove_proc_entry is used so darn much around the kernel, I wasn't sure it's not used in irq context. So I'm not sure I like the idea of making a non-scheduling function schedule. But it may not be a problem and it could very well be ok to schedule here.
Also as Mitchell Blank pointed out, this list should probably be protected everywhere by the same protection used, and an analysis should be done to see what replacing the BKL affects.
-- Steve
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |