Re: [PATCH v6 net-next 17/17] net: qualcomm: add QCA7000 UART driver

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

 



Hi,

On 23.05.2017 15:12, Stefan Wahren wrote:


> +}
> +
> +static void qca_uart_remove(struct serdev_device *serdev)
> +{
> +	struct qcauart *qca = serdev_device_get_drvdata(serdev);
> +
> +	netif_carrier_off(qca->net_dev);
> +	cancel_work_sync(&qca->tx_work);
> +	unregister_netdev(qca->net_dev);

Note that it is still possible that the tx work is queued right after cancel_work_sync()
returned and before the net device is unregistered (and thus the check for the net device
being up at the beginning of the tx work function is passed and the function is executed).
I suggest to avoid this possible race by first unregistering the netdevice and then 
calling cancel_work_sync().

Regards,
Lino 

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



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux