Skip to contentSkip to conversation

Problem with fix-rmmod-read-write-races-in-proc-entries.patch in 2.6.21-rc4-mm1

DISCUSSION Eric Dumazet 2 participants 2 messages Mar 22, 2007

lore
Share & tools
lore
#0 lore raw

Hi Alexey,

It seems you are fix-rmmod-read-write-races-in-proc-entries.patch author ?

/proc/kcore is no longer seekable (or mappable)

Also, do we really need to proxy via proc_reg_file_ops files that are not provided by a module ?

I think not.

Could you please add in proc_get_inode() a check against de->proc_fops->owner ?

if (de->proc_fops) {

#ifdef CONFIG_MODULE
    if (S_ISREG(inode->i_mode) && de->proc_fops->owner)
        inode->i_fop = &proc_reg_file_ops;
    else
#endif
        inode->i_fop = de->proc_fops;
}

Maybe the whole proc_reg_XXX() functions could be omitted for a kernel without module support ?

Thank you
Eric

#1 lore raw
Quoted 5 lines · Eric Dumazet

Also, do we really need to proxy via proc_reg_file_ops files that are not provided by a module ?

I think not.

Could you please add in proc_get_inode() a check against de->proc_fops->owner ?

Let's _not_. Bugs that depend on whether driver is built modular are hell to deal with.