aboutsummaryrefslogtreecommitdiff
path: root/net/nfc/netlink.c
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2011-12-14 16:43:07 +0100
committerJohn W. Linville <linville@tuxdriver.com>2011-12-14 14:50:12 -0500
commit94a098da42f258ae7019acbbea3bc5f93dc6f8f1 (patch)
treea0c03bd37faaf72ca839024433a4a90ae9d3b20a /net/nfc/netlink.c
parent7c7cd3bfec68fee33b30d177df6a6a0c4bbdc59d (diff)
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 <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/nfc/netlink.c')
-rw-r--r--net/nfc/netlink.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c
index 061711f4747..1d76d38c4a2 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);
}