]> git.baikalelectronics.ru Git - kernel.git/commit
drbd: remove /proc/drbd before unregistering from netlink
authorLars Ellenberg <lars.ellenberg@linbit.com>
Wed, 24 Nov 2010 09:37:35 +0000 (10:37 +0100)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 10 Mar 2011 10:35:12 +0000 (11:35 +0100)
commitb0527ae38f686d5deeadbe68368cbaab8937ae9f
treea3b6bd04eeecc0da14f20e6766495b3b06e7ce57
parentdb31291ffa1cda29664d36ccd8b40d992573915a
drbd: remove /proc/drbd before unregistering from netlink

There still exists a (theoretical) race on module unload, where
/proc/drbd may still exist, but the netlink callback has been
unregistered already, allowing drbdsetup to shout without listeners,
and get no reply.

Reorder remove_proc_entry and unregister of netlink callback.
drbdsetup first checks for existence of the proc entry,
and if that is missing, won't even try to contact the module.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_main.c