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=1796364493; b=YwkUsYEmxMusldajWdW7WnUahBFbH8JDtJlxTap85RtpYV9I5nPh6K8M7QW4vQu39P9r t7/8MeCpJn2NXajHr6yh73jZgWQ72QlRQ8bpEIX376MF2sBb4dcL9eOMjDZDoL+XJfB4C kGxJ6v+znx4pqdJYk/LURbIAD18x6ZutwtsnRGTKJvWdeyoHwxr5fT7pZBoKNbO3yAu1A GPdWDDEusJwDDXgw1AuaE7hG0orTJ41xRnJoLTVuPFYVfJFkVrOC2Q3iYxO40kqjHODkB PGLtCVtT5JvOPZYzQeqXKptgWLAvM1TDCjHb6nGdojf0su6+pX2OiIubcdX5iSVobCg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796364493; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=MJtJQ+QjVJlTM2/7Y2YmRO28l6/OohwA6XfxKTOo9Sk=; b=QOwzqJQp6zeVlMCQIw6wmsEM3uLo6IwieMS8dTHOzoJ7j6sBhTiJ3ujKbgvcDGg42pF8 yJpcHhhrTlNcUWPy4zpgSTl9cborQqN4jkmkTnvRhxXnGrFC9FMqMj/gluvCqJTwBkdmq B55p2fHXp2/6autoETpVDZGitDhp0lDWWwSnxG0q/wY8NuRUWfy1FUm39Dg4CTklM/UDT sXbEhJPhOTscC8YYhWm3/N1v4ODz8qYKBKrPtRjfn2LB0gBFc0O2XjVfbxejFoRb7ma5a DEQIRHYAW4LWOh3+nc4KH2/bu9cVp05v2Em6rypFIvUppOYkUanpjWJQsLSRRqaUPew== 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=Wuk7HQ3e; 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 03691606A322 for ; Fri, 4 Dec 2026 06:08: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=Wuk7HQ3e Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3D041F000C2; Fri, 4 Dec 2026 06:08:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796364492; bh=MJtJQ+QjVJlTM2/7Y2YmRO28l6/OohwA6XfxKTOo9Sk=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=Wuk7HQ3ervG2JIcSyB9ap0g7eu6/aWpqufLA8Z8yJtazRwpXQnfR4lpvEN4AJvZPN EGCK4C31pMfl5wmx40cQOwwqRJSTvMNq5xXH9YSDa3UP1yGY6hHIVtkp0o6C5TlEHZ NWMiD/LuFLMrPM7/ACIPyFtrJyA/TA0rqbtynWTDsdvKTWS61XU2V6nRzrfyeexj96 kjE7gzrXKGsilse86WQtE/VsxQtGBERaTJWCXOFZQ4JALTEKtpn3MA1bOPlj/+EpeD spaA6BMFB5g1pELkhwaXPsjZ6GJDSe99oYN+n563puQLccn9muHw5uwK1/OXIMhe8q K5NZirdVdgTEQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v2] vt: drop console_lock before calling __do_SAK() in vc_SAK() Reply-To: sashiko-reviews@lists.linux.dev To: "Jiayi Zhang" Cc: linux-serial@vger.kernel.org In-Reply-To: <20261204055437.1902380-1-zhangjiayi1014@gmail.com> References: <20261204055437.1902380-1-zhangjiayi1014@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 06:08:12 +0000 X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > vc_SAK() calls __do_SAK() on the console's tty with console_lock held. > __do_SAK() flushes the tty, and tty_buffer_flush() takes the buffer > lock of the tty. flush_to_ldisc() holds that buffer lock while it > passes input to the line discipline, and n_tty calls con_flush_chars(), > which takes console_lock, after each batch of input: >=20 > vc_SAK() flush_to_ldisc() > console_lock() mutex_lock(&buf->lock) > __do_SAK() n_tty_receive_buf_common() > tty_ldisc_flush() con_flush_chars() > tty_buffer_flush() console_lock() > mutex_lock(&buf->lock) >=20 > So a SAK on a virtual console that is receiving input can deadlock. > syzbot reports this dependency (console_lock -> &buf->lock) as part of > [ ... ] > Reported-by: syzbot+52cf91760dcb1dac6376@syzkaller.appspotmail.com > Closes: https://syzkaller.appspot.com/bug?extid=3D52cf91760dcb1dac6376 > Reported-by: syzbot+d84934b4184d7f9a1aed@syzkaller.appspotmail.com > Closes: https://syzkaller.appspot.com/bug?extid=3Dd84934b4184d7f9a1aed > Signed-off-by: Jiayi Zhang Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204055437.1902= 380-1-zhangjiayi1014@gmail.com?part=3D1