Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 94a098da authored by Samuel Ortiz's avatar Samuel Ortiz Committed by John W. Linville
Browse files

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: default avatarSamuel Ortiz <sameo@linux.intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 7c7cd3bf
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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);
	}