Re: [PATCH] net/sysfs: Remove devices without receive buffers

From: David Miller
Date: Sat Oct 13 2018 - 19:51:13 EST


From: Michael Bringmann <mwb@xxxxxxxxxxxxxxxxxx>
Date: Sat, 13 Oct 2018 17:05:28 -0500

> Testing ran into a case where a network device was created and
> initialized, but then removed from the system before accepting
> traffic through it. In this case, no receive buffers were added
> to the device prior to attempting to release the driver. This
> resulted in generation of a WARNING notice/stack trace in the
> console log like,

That's not legal.

The device must setup all of this kind of state before calling
register_netdevice(). And this must happen for reasons other than the
crash situation mentioned here.

Please fix the ibmvnic driver to not register partially setup netdev
objects.

Thank you.