From 94a098da42f258ae7019acbbea3bc5f93dc6f8f1 Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Wed, 14 Dec 2011 16:43:07 +0100 Subject: [PATCH] NFC: Do not take the genl mutex from the netlink release notifier The netlink notifier is atomic so we must not sleep in that context. Also we know that Any netlink packets arriving to us will be purged when the notifier is called, so we don't need to take the mutex. Signed-off-by: Samuel Ortiz Signed-off-by: John W. Linville --- net/nfc/netlink.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c index 061711f47476..1d76d38c4a24 100644 --- a/net/nfc/netlink.c +++ b/net/nfc/netlink.c @@ -504,12 +504,10 @@ static int nfc_genl_rcv_nl_event(struct notifier_block *this, dev = nfc_device_iter_next(&iter); while (dev) { - mutex_lock(&dev->genl_data.genl_data_mutex); if (dev->genl_data.poll_req_pid == n->pid) { nfc_stop_poll(dev); dev->genl_data.poll_req_pid = 0; } - mutex_unlock(&dev->genl_data.genl_data_mutex); dev = nfc_device_iter_next(&iter); } -- 2.39.5