Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1648367
| From | Stefan Wahren <stefan.wahren@i2se.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v6 net-next 17/17] net: qualcomm: add QCA7000 UART driver |
| Date | 2017-05-23 21:40 +0200 |
| Message-ID | <tKnOW-7FB-17@gated-at.bofh.it> (permalink) |
| References | <tKhTb-3GR-3@gated-at.bofh.it> <tKhTb-3GR-5@gated-at.bofh.it> <tKmzw-6Qv-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> Lino Sanfilippo <LinoSanfilippo@gmx.de> hat am 23. Mai 2017 um 20:16 geschrieben:
>
>
> 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).
Even if the carrier is off? Since i see this pattern in some drivers, can you please point me to a reference like a thread or something else?
> I suggest to avoid this possible race by first unregistering the netdevice and then
> calling cancel_work_sync().
What makes you sure that's safe to unregister the netdev while the tx work queue is possibly active?
> Regards,
> Lino
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v6 net-next 17/17] net: qualcomm: add QCA7000 UART driver Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-23 15:20 +0200
Re: [PATCH v6 net-next 17/17] net: qualcomm: add QCA7000 UART driver Lino Sanfilippo <LinoSanfilippo@gmx.de> - 2017-05-23 20:20 +0200
Re: [PATCH v6 net-next 17/17] net: qualcomm: add QCA7000 UART driver Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-23 21:40 +0200
Re: [PATCH v6 net-next 17/17] net: qualcomm: add QCA7000 UART driver Lino Sanfilippo <LinoSanfilippo@gmx.de> - 2017-05-23 23:20 +0200
Re: [PATCH v6 net-next 17/17] net: qualcomm: add QCA7000 UART driver Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-24 11:10 +0200
[PATCH v7 net-next 17/17] net: qualcomm: add QCA7000 UART driver Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-24 11:40 +0200
[PATCH RESEND v7 net-next 17/17] net: qualcomm: add QCA7000 UART driver Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-24 11:40 +0200
Re: [PATCH RESEND v7 net-next 17/17] net: qualcomm: add QCA7000 UART driver "Lino Sanfilippo" <LinoSanfilippo@gmx.de> - 2017-05-24 16:30 +0200
Re: [PATCH RESEND v7 net-next 17/17] net: qualcomm: add QCA7000 UART driver Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-24 16:40 +0200
Aw: Re: [PATCH v6 net-next 17/17] net: qualcomm: add QCA7000 UART driver "Lino Sanfilippo" <LinoSanfilippo@gmx.de> - 2017-05-24 16:30 +0200
csiph-web