2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-22 20:23:57 +08:00
linux-next/drivers/scsi/fcoe
Chris Leech 2e70e24151 [SCSI] fcoe: Fix module ref count bug by adding NETDEV UNREGISTER handling
Fixes reference counting on fcoe_instance and net_device, and adds
NETDEV_UNREGISTER notifier handling so that you can unload network drivers.
FCoE no longer increments the module use count for the network driver.

On an NETDEV_UNREGISTER event, destroying the FCoE instance is deferred to a
workqueue context to avoid RTNL deadlocks.

Based in part by an earlier patch from John Fastabend

John's patch description:
Currently, the netdev module ref count is not decremented with module_put()
when the module is unloaded while fcoe instances are present. To fix this
removed reference count on netdev module completely and added functionality to
netdev event handling for NETDEV_UNREGISTER events.

This allows fcoe to remove devices cleanly when the netdev module is unloaded
so we no longer need to hold a reference count for the netdev module.

Signed-off-by: Chris Leech <christopher.leech@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-09-10 12:07:38 -05:00
..
fcoe.c [SCSI] fcoe: Fix module ref count bug by adding NETDEV UNREGISTER handling 2009-09-10 12:07:38 -05:00
fcoe.h [SCSI] fcoe: Fix module ref count bug by adding NETDEV UNREGISTER handling 2009-09-10 12:07:38 -05:00
libfcoe.c [SCSI] libfcoe: fcoe_ctlr_destroy use cancel_work_sync instead of flush_work 2009-09-10 12:07:28 -05:00
Makefile [SCSI] fcoe, libfc: add libfcoe module 2009-04-03 09:23:04 -05:00