From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796379156; b=XA5PbcTKLWTDH89EmYIqlifhxGZfmF0m0eaXQABdLa0CHkUzRnPk9jrbubHmfN1euDZp kFNmt0VeeoE6Ffnokk/GQ71WTnl2YXlQqEo5rqb9pnU9n9w1q643VFuDt2WS0yjIV8FV7 SljmHA/Pd/w0SASabs8d/zYq3Hk/MsFjhsqnZ7/D4+CekV6r7H+aCeXTc/9RFUmf4Ccbj RR4Dzv+8NwLaimTbwYCPULkxaUscfDAlNF27816Z84nTYFUchmkor2lXsp7HTgS/IYNWC 0xQgXUhNUYf9FKT13YVjGpsIai/b9QjcRQevp0FqPZtksNmyB6bj4Q2N5rZ1cZi53iA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796379156; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=nTQzh31MMSxF357Nmh8P+znGi/53BPVdPmjKEewk5MA=; b=o/Fycl3+63U9wVmA1PB35n5/v8N9ZhbJKDqDc6cAEoV9QCRsSYLtXEgegTSIbBr5VUQB Dh2OYNe9e0Nizk/nmMPZiOthmtCPDIjMHL1+CTwr0fjQydDj6tE3xHedAmmqGQ/y0YQeP W90oQmsH5r6fzZsHHasJfC059uz/va2PaQyM2P0xg9Vq5DWvhpzgddkXsBB3TDluDdl1M 9fD9HwTmMneq/ysEK1cQpYq8j9dqv3NRzMLdaHGDt2trwD2vTEceJhkEemUTcArXHNrHX fzZoqYDmIBkEn/Oxv48O8lvx+Fu5YwVdkinBg+ScUEiafhL4RY8SYCHeDSptdymlxKQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=N4wr46k3; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B39E6606A322 for ; Fri, 4 Dec 2026 10:12:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=N4wr46k3 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 649C91F000C2; Fri, 4 Dec 2026 10:12:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796379156; bh=nTQzh31MMSxF357Nmh8P+znGi/53BPVdPmjKEewk5MA=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=N4wr46k3mt2qKKv+wYWvJUYPEK6IWigHjDF3KTFWIplzN76L+xsC1yHlwy38TvQ+D 6iTQBHLcITM0El7mcYlsDovGiApLl6HOBLekQbylHH2w1jQrFG+ITxAn0UXHfy/fqB Mr6CYRw8hJpukLcr0Rj4QDmJivgW9iFq1FlvsrHO+udx8ZNH28efrUzsZpp8a7OE3L IgQI2qYrjkSsGkWT9pBcAUanjnvLZ2qGiye3do7plZ4YeB7fgtFUayVApm4Poa+r7L MgZkU4ZEygE+LmVap3Fy3OeZAvi5MJQQnhTtEgaDEs3XRdhlrkIIc6ufSeCdP+giFb 7dYwHuqhYSDLQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v2] serial: 8250_mid: lock RX DMA timeout flushing Reply-To: sashiko-reviews@lists.linux.dev To: "James Hilliard" Cc: linux-serial@vger.kernel.org In-Reply-To: <20261204-submit-serial-8250-mid-rx-lock-v1-v2-1-7c773895f58d@gmail.com> References: <20261204-submit-serial-8250-mid-rx-lock-v1-v2-1-7c773895f58d@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 10:12:35 +0000 X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > The Tangier and Denverton DMA timeout handlers call > serial8250_rx_dma_flush() without holding the UART port lock. The helper > pauses the transfer, copies received data, updates RX state and terminates > the channel. The DMA completion callback accesses the same state under the > port lock, so it can race an unlocked timeout flush. The IRQ-chain lock > held by serial8250_interrupt() does not serialize the completion callback. >=20 > Take the port lock around each timeout flush. Release it before handling > the UART interrupt, since serial8250_handle_irq() acquires the port lock > itself. >=20 > Fixes: 692aa1905679 ("serial: 8250_mid: Read RX buffer on RX DMA timeout = for DNV") > Fixes: 4831e0d9054c ("serial: 8250_mid: handle interrupt correctly in DMA= case") > Cc: stable@vger.kernel.org > Signed-off-by: James Hilliard Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204-submit-ser= ial-8250-mid-rx-lock-v1-v2-1-7c773895f58d@gmail.com?part=3D1