[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <de1fd28a-0c7c-23ae-8b9d-83a682c169e3@suse.com>
Date: Thu, 30 Sep 2021 11:04:19 +0200
From: Oliver Neukum <oneukum@...e.com>
To: Johan Hovold <johan@...nel.org>, Oliver Neukum <oneukum@...e.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH 1/2] USB: cdc-acm: fix racy tty buffer accesses
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@...r.kernel.org
> Signed-off-by: Johan Hovold <johan@...nel.org>
Acked-by: Oliver Neukum <oneukum@...e.com>
Powered by blists - more mailing lists