On Tue, Jun 9, 2015 at 5:35 AM, Nikolay Aleksandrov
<[email protected]> wrote:
> On Mon, Jun 8, 2015 at 8:35 PM, Shrijeet Mukherjee
> <[email protected]> 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html