OpenVZ Forum


Home » Mailing lists » Devel » Racy /proc creations interfaces
Re: Racy /proc creations interfaces [message #9344 is a reply to message #9325] Wed, 27 December 2006 13:56 Go to previous messageGo to previous message
Al Viro is currently offline  Al Viro
Messages: 5
Registered: March 2006
Junior Member
On Wed, Dec 27, 2006 at 04:42:23PM +0300, Alexey Dobriyan wrote:
>
> struct proc_entry_raw foo_pe_raw = {
> .owner = THIS_MODULE,
> .name = "foo",
> .mode = 0644,
> .read_proc = foo_read_proc,
> .data = foo_data,
> .parent = foo_parent,
> };
>
> pde = create_proc_entry(&foo_pe_raw);
> if (!pde)
> return -ENOMEM;
>
> where "struct proc_entry_raw" is cut down version of "struct proc_dir_entry"

Ewwwwwwwwwwwwwww

Please, please no. Especially not .parent. If anything, let's add a
helper saying "it's all set up now". And turn create_proc_entry()
into a macro that would pass THIS_MODULE to underlying function and
call that helper, so that simple cases wouldn't have to bother at all.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: + statically-initialize-struct-pid-for-swapper.patch added to -mm tree
Next Topic: Re: Re: [PATCH/RFC] kthread API conversion for dvb_frontend and av7110
Goto Forum:
  


Current Time: Sat Aug 10 18:58:09 GMT 2024

Total time taken to generate the page: 0.04489 seconds