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:	Tue, 9 Jun 2015 19:11:21 -0700
From:	Shrijeet Mukherjee <shm@...ulusnetworks.com>
To:	Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
Cc:	Hannes Frederic Sowa <hannes@...essinduktion.org>,
	Nicolas Dichtel <nicolas.dichtel@...nd.com>,
	David Ahern <dsahern@...il.com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Jamal Hadi Salim <hadi@...atatu.com>,
	David Miller <davem@...emloft.net>,
	Stephen Hemminger <stephen@...workplumber.org>,
	Netdev <netdev@...r.kernel.org>,
	Roopa Prabhu <roopa@...ulusnetworks.com>,
	Andy Gospodarek <gospo@...ulusnetworks.com>,
	Jon Toppins <jtoppins@...ulusnetworks.com>
Subject: Re: [RFC net-next 2/3] VRF driver and needed infrastructure

On Tue, Jun 9, 2015 at 5:35 AM, Nikolay Aleksandrov
<nikolay@...ulusnetworks.com> wrote:
> On Mon, Jun 8, 2015 at 8:35 PM, Shrijeet Mukherjee
> <shm@...ulusnetworks.com> wrote:
>
> vrf_kill_one_slave() calls netdev_rx_handler_unregister() which does
> synchronize_rcu() and
> here you're running with the queue spinlock held and softirqs disabled.
>




>> +
>> +       dev_hold(slave->dev);
>> +       list_add(&slave->list, &queue->all_slaves);
>> +       queue->num_slaves++;
>> +       slave->dev->flags |= IFF_SLAVE;
>> +
>> +       slave->dev->vrf_ptr = kmalloc(sizeof(*slave->dev->vrf_ptr), GFP_KERNEL);
>
> Again this runs with a spinlock and softirqs disabled, GFP_KERNEL can sleep.
>

Good catches, also the one below .. will spin a rev2 patch shortly
with these fixes.

Also working on incorporating Hannes's and Dahern's patches ..


>> +static void vrf_dellink(struct net_device *dev, struct list_head *head)
>> +{
>> +       /* Need to free the table ? */
>> +       unregister_netdev(dev);
>
> I think ->dellink() runs with rtnl held and unregister_netdev() tries
> to acquire rtnl
> so you'll probably deadlock here.
>
>> +}

yup.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ