Subject: Re: buggy check in netlink_mmap_sendmsg()

From: Al Viro <[email-masked]>
Date: Fri, 19 Jul 2013 16:45:56 +0100

On Fri, Jul 19, 2013 at 05:38:46PM +0200, Patrick McHardy wrote:

> >From what I can tell, the second check should catch the second case you
> describe. If the address space is shared, dup_mmap() will invoke
> netlink_mmap_ops->open

See the check for CLONE_VM in copy_mm(); we do not call dup_mm() (which would
be calling dup_mmap()) in that case.