Skip to content

Commit

Permalink
NFC: Do not take the genl mutex from the netlink release notifier
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Samuel Ortiz authored and John W. Linville committed Dec 14, 2011
1 parent 7c7cd3b commit 94a098d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions net/nfc/netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 94a098d

Please sign in to comment.