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=1796453773; b=rU+D2mNjg4HMxu7ZeOkkBQvr6Q2StV+V9Rg8rtVaPdaqVxUYMi5AEd8pfZbOkkOs/5VL dg5kkJAX4DbLBxG+itAuAc0ImN9053wJD81PYTAZMqNnb75OfeODALvlQYiHaOAbXGdqJ k0sScnOVc2Wyd1c6XvA9E66UeFkv1Fj4kScFot61HKsfYwJvBcuKf3aqjVLmrqwjzUksp cmYcBkC/e7YqILSO6xrsAVGzgd6XsdeIgxOsqkmyeZlqrUERtO/xkOIlr7Yjz60gHYRwp Y8/CEOoqFh0UUhml9rjZFrO6zPurA+KB4Yg7LLokXcWyi7zJvhcQ2Vjmw8nt2Q8GJKA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796453773; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=kMQOaYJVsFNtboECyqcKIzO52itBZvl37J+tr+j6XR8=; b=GcqZv+OUXx871wTbCc417FcZjeGO2SvrgA/tq9NzeoOzwunVpphOojgxpl7wXjFwiQ3a vu6Bnq6FcdZlUeQl0GF5ZOdy1jeLmdP7MV7MocD5rqhv/YzGrFWaPsnvnn+U0LqGb9oCr 4oDa2vdq+IZgmsXYqake3ZYORVIb6xALmDc/NBdEDjdc++cKJp4iPPkFSnYfYLvF4bqXd XDEKPVqkdV+goJVaUHjYW4Wtkhljel0zpoLhRsgU8dURNCxlEvoNr7VagAthtjI5Ym1v5 LOIGYrvFOk+ZeYtHMPIEnDTMyvViyPHpA0qWgCK0RtdQngW35QjAkc1x86Wq61RJuCg== 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=jD07qIiF; 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 3B962606A32F; Sat, 5 Dec 2026 06:56:13 +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=jD07qIiF Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7FBB1F0092B; Sat, 5 Dec 2026 06:56:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796453772; bh=kMQOaYJVsFNtboECyqcKIzO52itBZvl37J+tr+j6XR8=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=jD07qIiF6IBfhFaiQ6tcZrLCC0Mltz/S2WefBE4jeIay5+mFLUvRLKf3WH+3cfkSc Tindj7nXBoe3ytDqx3Dty1xyiHkc2wfLvEz4biMXnCw92R/RVTqx06lxh0oOFWan90 ucIAJgFbWbU27GN2U9EyLO/upHLotrOR8MZcCt8tYS5fUu9m2b8L833w5Z6t74ey7x pzspAO1R0uNlDX2j2hiHsNjkBqFMYG/hVyl/Cci3HQLAapdQA/iJvYbTpAcpi/9Uoa /Mmg5edZrv3dsmfLi4DAyX2a0iwnmsX1nzzTHsQlbvQYAMS3uAduiTfVMPnEzhMr4s C83IGiw+HJgkw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 4/4] mxser: take termios_rwsem in mxser_set_serial_info() Reply-To: sashiko-reviews@lists.linux.dev To: "Praneeth Balasubramanian" Cc: linux-serial@vger.kernel.org, imx@lists.linux.dev, Frank.Li@kernel.org In-Reply-To: <20261205063536.2519566-5-praneethb2002@gmail.com> References: <20261205063536.2519566-1-praneethb2002@gmail.com> <20261205063536.2519566-5-praneethb2002@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sat, 05 Dec 2026 06:56:12 +0000 X-Mailing-List: imx@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] tty: mxser: missing Fixes trailer on bug-fix commit -- commit 44a7f707c343c7759dfecdededbf501d80470e81 Author: Praneeth Balasubramanian > mxser: take termios_rwsem in mxser_set_serial_info() > > mxser_set_serial_info() updates the termios without holding > tty->termios_rwsem. It calls tty_encode_baud_rate() which writes c_ispeed > and c_ospeed and rewrites the CBAUD bits of c_cflag. It also reads the > termios in mxser_change_speed() and mxser_activate(). > > A concurrent TCSETS or TCSETS2 on the same tty stores the whole termios > under termios_rwsem in tty_set_termios(). The TIOCSSERIAL path takes no > termios_rwsem. The two writers can interleave. The whole-struct store can > land between the speed stores and leave c_cflag, c_ispeed and c_ospeed > disagreeing with each other. > > Take termios_rwsem for write at the top of mxser_set_serial_info(). > Take it before port->mutex. serial_core takes termios_rwsem before > port->mutex in uart_set_info_user() and both lock classes are global. The > same order here avoids a lockdep inversion. Nothing inside the critical > section takes termios_rwsem itself. > > This was found by an LLM-based audit that checks code against the rules > stated in kernel comments. > > Signed-off-by: Praneeth Balasubramanian [Severity: Low] This fixes an unlocked tty_encode_baud_rate() call in mxser_set_serial_info(). Should this include: Fixes: 80ff8a805113 ("Char: mxser, add support for CP-114UL") --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261205063536.2519= 566-1-praneethb2002@gmail.com?part=3D4