Re: [PATCH] fs/proc: Move kfree outside pde_unload_lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 29, 2012 at 7:11 AM, Eric Dumazet <eric.dumazet@xxxxxxxxx> wrote:
> I'll polish this patch once LKS/LPC is over...

It should oops in the following way (excuse Gmail please):
PDEO is removed from lists
->pde_users is 0
PDE won't be in purge queue -- no ->release while module is alive

Current code removes PDEO and checks if PDE scheduled for removal atomically.

proc_reg_release                                        remove_proc_entry

                                                        de->proc_fops = NULL;
release = pde_opener_del(inode, file);
rcu_read_lock();
                                                        synchronize_rcu();
fops = rcu_dereference(pde->proc_fops);
if (!fops) {
        rcu_read_unlock();
                         ----------------------------------
                                                        /* NOP */
                                                        while
(atomic_read(&de->pde_users))
                                                                ...
                                                        /* NOP */

pde_openers_purge(de, &purge_queue);
                                                        /* NOP */
                                                        while
(!list_empty(&purge_queue))
                                                                ...
                                                        rmmod

        if (release)
                release(inode, file) /* OOPS */
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux