[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AS8PR05MB9810A677E1036D59D23448EE83DF2@AS8PR05MB9810.eurprd05.prod.outlook.com>
Date: Tue, 18 Mar 2025 09:46:14 +0000
From: Maarten Brock <Maarten.Brock@...ls.nl>
To: Greg KH <gregkh@...uxfoundation.org>, Elodie Decerle
<elodie.decerle@...ia.com>
CC: "jacmet@...site.dk" <jacmet@...site.dk>, "jirislaby@...nel.org"
<jirislaby@...nel.org>, "jakub.lewalski@...ia.com"
<jakub.lewalski@...ia.com>, "linux-serial@...r.kernel.org"
<linux-serial@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] tty: serial: uartlite: ensure uart driver is registered
Hi,
> > When two instances of uart devices are probing, a concurrency race can
> > occur.
> >
> > Adding a mutex lock around the uart_register_driver call in the probe
> > function prevents this race condition and ensures that the uart driver
> > structure is fully initialized and registered before it is used.
>
> So the problem that there is a single "state" for the driver as a whole.
> That should be fixed up to be local to each individual device that is
> added to the system. Don't add a lock to paper over this as odds are
> this is not the only place that will have problems.
>
> Are you just now having 2 of these devices in your system at the same
> time?
In the past I have created a Zynq 7000 based system (dual core ARM) with
11 uartlites and I have not seen this problem. This was with a 5.10 kernel.
Maarten
Powered by blists - more mailing lists