lkml.org 
[lkml]   [2021]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 1/2] USB: cdc-acm: fix racy tty buffer accesses
    From
    Date

    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>

    \
     
     \ /
      Last update: 2021-09-30 11:04    [W:2.599 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site