Messages in this thread | | | Subject | Re: [PATCH 1/2] USB: cdc-acm: fix racy tty buffer accesses | From | Oliver Neukum <> | Date | Thu, 30 Sep 2021 11:04:19 +0200 |
| |
On 29.09.21 11:09, Johan Hovold wrote: > A recent change that started reporting break events to the line > discipline caused the tty-buffer insertions to no longer be serialised > by inserting events also from the completion handler for the interrupt > endpoint. > > Completion calls for distinct endpoints are not guaranteed to be > serialised. For example, in case a host-controller driver uses > bottom-half completion, the interrupt and bulk-in completion handlers > can end up running in parallel on two CPUs (high-and low-prio tasklets, > respectively) thereby breaking the tty layer's single producer > assumption. > > Fix this by holding the read lock also when inserting characters from > the bulk endpoint. > > Fixes: 08dff274edda ("cdc-acm: fix BREAK rx code path adding necessary calls") > Cc: stable@vger.kernel.org > Signed-off-by: Johan Hovold <johan@kernel.org> Acked-by: Oliver Neukum <oneukum@suse.com>
| |