lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 29 Aug 2012 07:24:48 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Alexey Dobriyan <adobriyan@...il.com>
Cc:	Nathan Zimmer <nzimmer@....com>, linux-kernel@...r.kernel.org,
	linux-fsdevel@...r.kernel.org,
	Alexander Viro <viro@...iv.linux.org.uk>,
	David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH] fs/proc: Move kfree outside pde_unload_lock

On Wed, 2012-08-29 at 16:50 +0300, Alexey Dobriyan wrote:
> On Wed, Aug 29, 2012 at 7:11 AM, Eric Dumazet <eric.dumazet@...il.com> 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 */

Fix should be trivial, proper module refcount for example.

As I said, I would do that after LKS/LPC, there is no hurry.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ