From: Gui-Dong Han <2045gemini@gmail.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"John Ogness" <john.ogness@linutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
Tony Lindgren <tony@atomide.com>,
l.sanfilippo@kunbus.com, tglx@linutronix.de,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-serial <linux-serial@vger.kernel.org>,
baijiaju1990@outlook.com, stable@vger.kernel.org
Subject: Re: [PATCH] serial: core: Fix atomicity violation in uart_tiocmget
Date: Fri, 12 Jan 2024 19:23:17 +0800 [thread overview]
Message-ID: <060d729a-259c-4cfd-b785-17986e3e735f@gmail.com> (raw)
In-Reply-To: <4a52df23-71c3-59c7-fee4-e7cde526d249@linux.intel.com>
Hi,
You are correct about the 'Fixes' tag. It should indeed be c5f4644e6c8b
("[PATCH] Serial: Adjust serial locking"). I will update this in the
patch v2.
Regarding the issue found in Linux 5.17, I mistakenly used git blame
which led to the incorrect identification of commit 559c7ff4e324. The
issue indeed exists in Linux 5.17 and I acknowledge the error in tracing
the commit.
In uart_tiocmget(), the result variable is stable. However, there's a
risk of inconsistency due to the updates in uart_update_mctrl().
Consider a scenario where uart_tiocmget() reads uport->mctrl into result
before entering the critical section. If uart_update_mctrl() updates
port->mctrl and calls set_mctrl concurrently, the subsequent execution
of result |= uport->ops->get_mctrl(uport); in uart_tiocmget() might
yield an inaccurate result. This happens because result contains the old
value of port->mctrl, which no longer matches the updated state
retrieved by get_mctrl.
Thanks,
Han
next prev parent reply other threads:[~2024-01-12 11:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-12 7:57 [PATCH] serial: core: Fix atomicity violation in uart_tiocmget Gui-Dong Han
2024-01-12 9:30 ` John Ogness
2024-01-12 9:40 ` Ilpo Järvinen
2024-01-12 11:23 ` Gui-Dong Han [this message]
2024-01-12 9:33 ` Ilpo Järvinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=060d729a-259c-4cfd-b785-17986e3e735f@gmail.com \
--to=2045gemini@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=baijiaju1990@outlook.com \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=john.ogness@linutronix.de \
--cc=l.sanfilippo@kunbus.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox