Search Linux Wireless

RE: [PATCH 3/8] NFC: Do not take the genl mutex from the netlink release notifier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi  Samuel,

> @@ -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);
>  	}

Please note that the function nfc_stop_poll might also sleep, since mutex_lock is also called inside:
nfc_genl_rcv_nl_event -> nfc_stop_poll -> device_lock -> mutex_lock.

BR,
Ilan--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux