]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop staging-greybus-uart-fix-atomicity-violation-in-get_.patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Dec 2024 08:30:55 +0000 (09:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Dec 2024 08:30:55 +0000 (09:30 +0100)
14 files changed:
queue-5.10/series
queue-5.10/staging-greybus-uart-fix-atomicity-violation-in-get_.patch [deleted file]
queue-5.15/series
queue-5.15/staging-greybus-uart-fix-atomicity-violation-in-get_.patch [deleted file]
queue-5.4/series
queue-5.4/staging-greybus-uart-fix-atomicity-violation-in-get_.patch [deleted file]
queue-6.1/series
queue-6.1/staging-greybus-uart-fix-atomicity-violation-in-get_.patch [deleted file]
queue-6.11/series
queue-6.11/staging-greybus-uart-fix-atomicity-violation-in-get_.patch [deleted file]
queue-6.12/series
queue-6.12/staging-greybus-uart-fix-atomicity-violation-in-get_.patch [deleted file]
queue-6.6/series
queue-6.6/staging-greybus-uart-fix-atomicity-violation-in-get_.patch [deleted file]

index 8e725d981f1927b75a36a70a8854ef40cedb615e..689d490627bddf43c41a24e2330ba410be84eaf4 100644 (file)
@@ -227,7 +227,6 @@ usb-chaoskey-fail-open-after-removal.patch
 usb-chaoskey-fix-possible-deadlock-chaoskey_list_loc.patch
 misc-apds990x-fix-missing-pm_runtime_disable.patch
 staging-greybus-uart-clean-up-tiocgserial.patch
-staging-greybus-uart-fix-atomicity-violation-in-get_.patch
 alsa-hda-realtek-add-type-for-alc287.patch
 alsa-hda-realtek-update-alc256-depop-procedure.patch
 apparmor-fix-do-simple-duplicate-message-elimination.patch
diff --git a/queue-5.10/staging-greybus-uart-fix-atomicity-violation-in-get_.patch b/queue-5.10/staging-greybus-uart-fix-atomicity-violation-in-get_.patch
deleted file mode 100644 (file)
index f12e002..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-From 063dd345b5a511167552b9dfcd2dd8fc565f48bf Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 7 Nov 2024 19:33:37 +0800
-Subject: staging: greybus: uart: Fix atomicity violation in get_serial_info()
-
-From: Qiu-ji Chen <chenqiuji666@gmail.com>
-
-[ Upstream commit fe0ebeafc3b723b2f8edf27ecec6d353b08397df ]
-
-Our static checker found a bug where set_serial_info() uses a mutex, but
-get_serial_info() does not. Fortunately, the impact of this is relatively
-minor. It doesn't cause a crash or any other serious issues. However, if a
-race condition occurs between set_serial_info() and get_serial_info(),
-there is a chance that the data returned by get_serial_info() will be
-meaningless.
-
-Signed-off-by: Qiu-ji Chen <chenqiuji666@gmail.com>
-Fixes: 0aad5ad563c8 ("greybus/uart: switch to ->[sg]et_serial()")
-Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
-Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
-Reviewed-by: Alex Elder <elder@riscstar.com>
-Link: https://lore.kernel.org/r/20241107113337.402042-1-chenqiuji666@gmail.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/staging/greybus/uart.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c
-index 5cdc5dff9f55b..257f917a93745 100644
---- a/drivers/staging/greybus/uart.c
-+++ b/drivers/staging/greybus/uart.c
-@@ -611,11 +611,13 @@ static int get_serial_info(struct tty_struct *tty,
-       struct gb_tty *gb_tty = tty->driver_data;
-       ss->line = gb_tty->minor;
-+      mutex_lock(&gb_tty->port.mutex);
-       ss->close_delay = jiffies_to_msecs(gb_tty->port.close_delay) / 10;
-       ss->closing_wait =
-               gb_tty->port.closing_wait == ASYNC_CLOSING_WAIT_NONE ?
-               ASYNC_CLOSING_WAIT_NONE :
-               jiffies_to_msecs(gb_tty->port.closing_wait) / 10;
-+      mutex_unlock(&gb_tty->port.mutex);
-       return 0;
- }
--- 
-2.43.0
-
index 9667f5fedcc8e859722a044a951ebedb34df13a2..328d7248709c79b90ae4a3d438650e4365c741ea 100644 (file)
@@ -279,7 +279,6 @@ usb-chaoskey-fail-open-after-removal.patch
 usb-chaoskey-fix-possible-deadlock-chaoskey_list_loc.patch
 misc-apds990x-fix-missing-pm_runtime_disable.patch
 counter-stm32-timer-cnt-add-check-for-clk_enable.patch
-staging-greybus-uart-fix-atomicity-violation-in-get_.patch
 alsa-hda-realtek-update-alc256-depop-procedure.patch
 apparmor-fix-do-simple-duplicate-message-elimination.patch
 parisc-fix-a-possible-dma-corruption.patch
diff --git a/queue-5.15/staging-greybus-uart-fix-atomicity-violation-in-get_.patch b/queue-5.15/staging-greybus-uart-fix-atomicity-violation-in-get_.patch
deleted file mode 100644 (file)
index 185c22d..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-From be8fa963ec0b0e359b07ab763a7a10f460e2ddde Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 7 Nov 2024 19:33:37 +0800
-Subject: staging: greybus: uart: Fix atomicity violation in get_serial_info()
-
-From: Qiu-ji Chen <chenqiuji666@gmail.com>
-
-[ Upstream commit fe0ebeafc3b723b2f8edf27ecec6d353b08397df ]
-
-Our static checker found a bug where set_serial_info() uses a mutex, but
-get_serial_info() does not. Fortunately, the impact of this is relatively
-minor. It doesn't cause a crash or any other serious issues. However, if a
-race condition occurs between set_serial_info() and get_serial_info(),
-there is a chance that the data returned by get_serial_info() will be
-meaningless.
-
-Signed-off-by: Qiu-ji Chen <chenqiuji666@gmail.com>
-Fixes: 0aad5ad563c8 ("greybus/uart: switch to ->[sg]et_serial()")
-Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
-Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
-Reviewed-by: Alex Elder <elder@riscstar.com>
-Link: https://lore.kernel.org/r/20241107113337.402042-1-chenqiuji666@gmail.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/staging/greybus/uart.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c
-index dc4ed0ff1ae27..b6b136d6a691d 100644
---- a/drivers/staging/greybus/uart.c
-+++ b/drivers/staging/greybus/uart.c
-@@ -597,11 +597,13 @@ static int get_serial_info(struct tty_struct *tty,
-       struct gb_tty *gb_tty = tty->driver_data;
-       ss->line = gb_tty->minor;
-+      mutex_lock(&gb_tty->port.mutex);
-       ss->close_delay = jiffies_to_msecs(gb_tty->port.close_delay) / 10;
-       ss->closing_wait =
-               gb_tty->port.closing_wait == ASYNC_CLOSING_WAIT_NONE ?
-               ASYNC_CLOSING_WAIT_NONE :
-               jiffies_to_msecs(gb_tty->port.closing_wait) / 10;
-+      mutex_unlock(&gb_tty->port.mutex);
-       return 0;
- }
--- 
-2.43.0
-
index 8f11be87db1b98f5f1fb7f26ec155860cd6bd273..f5febee87ebe8eaa422edbaeda983416dfffaac7 100644 (file)
@@ -139,7 +139,6 @@ usb-chaoskey-fail-open-after-removal.patch
 usb-chaoskey-fix-possible-deadlock-chaoskey_list_loc.patch
 misc-apds990x-fix-missing-pm_runtime_disable.patch
 staging-greybus-uart-clean-up-tiocgserial.patch
-staging-greybus-uart-fix-atomicity-violation-in-get_.patch
 apparmor-fix-do-simple-duplicate-message-elimination.patch
 usb-ehci-spear-fix-call-balance-of-sehci-clk-handling-routines.patch
 cgroup-make-operations-on-the-cgroup-root_list-rcu-safe.patch
diff --git a/queue-5.4/staging-greybus-uart-fix-atomicity-violation-in-get_.patch b/queue-5.4/staging-greybus-uart-fix-atomicity-violation-in-get_.patch
deleted file mode 100644 (file)
index b983c98..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-From c24368adc983d40ef1080a6c1d3b40d4393614d9 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 7 Nov 2024 19:33:37 +0800
-Subject: staging: greybus: uart: Fix atomicity violation in get_serial_info()
-
-From: Qiu-ji Chen <chenqiuji666@gmail.com>
-
-[ Upstream commit fe0ebeafc3b723b2f8edf27ecec6d353b08397df ]
-
-Our static checker found a bug where set_serial_info() uses a mutex, but
-get_serial_info() does not. Fortunately, the impact of this is relatively
-minor. It doesn't cause a crash or any other serious issues. However, if a
-race condition occurs between set_serial_info() and get_serial_info(),
-there is a chance that the data returned by get_serial_info() will be
-meaningless.
-
-Signed-off-by: Qiu-ji Chen <chenqiuji666@gmail.com>
-Fixes: 0aad5ad563c8 ("greybus/uart: switch to ->[sg]et_serial()")
-Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
-Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
-Reviewed-by: Alex Elder <elder@riscstar.com>
-Link: https://lore.kernel.org/r/20241107113337.402042-1-chenqiuji666@gmail.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/staging/greybus/uart.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c
-index b8da6dc5d4d4d..ae83255e9046c 100644
---- a/drivers/staging/greybus/uart.c
-+++ b/drivers/staging/greybus/uart.c
-@@ -622,11 +622,13 @@ static int get_serial_info(struct tty_struct *tty,
-       struct gb_tty *gb_tty = tty->driver_data;
-       ss->line = gb_tty->minor;
-+      mutex_lock(&gb_tty->port.mutex);
-       ss->close_delay = jiffies_to_msecs(gb_tty->port.close_delay) / 10;
-       ss->closing_wait =
-               gb_tty->port.closing_wait == ASYNC_CLOSING_WAIT_NONE ?
-               ASYNC_CLOSING_WAIT_NONE :
-               jiffies_to_msecs(gb_tty->port.closing_wait) / 10;
-+      mutex_unlock(&gb_tty->port.mutex);
-       return 0;
- }
--- 
-2.43.0
-
index 00a6c14a214333f6632fe7340ef5e403c995294f..10949a0ce2ee6495036fc317c27a4f315f143d1f 100644 (file)
@@ -338,7 +338,6 @@ usb-chaoskey-fix-possible-deadlock-chaoskey_list_loc.patch
 misc-apds990x-fix-missing-pm_runtime_disable.patch
 counter-stm32-timer-cnt-add-check-for-clk_enable.patch
 counter-ti-ecap-capture-add-check-for-clk_enable.patch
-staging-greybus-uart-fix-atomicity-violation-in-get_.patch
 alsa-hda-realtek-update-alc256-depop-procedure.patch
 apparmor-fix-do-simple-duplicate-message-elimination.patch
 asoc-amd-yc-fix-for-enabling-dmic-on-acp6x-via-_dsd-.patch
diff --git a/queue-6.1/staging-greybus-uart-fix-atomicity-violation-in-get_.patch b/queue-6.1/staging-greybus-uart-fix-atomicity-violation-in-get_.patch
deleted file mode 100644 (file)
index 3b3e625..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-From 4006fbd05de7a109badd548ef342d6342a260f7a Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 7 Nov 2024 19:33:37 +0800
-Subject: staging: greybus: uart: Fix atomicity violation in get_serial_info()
-
-From: Qiu-ji Chen <chenqiuji666@gmail.com>
-
-[ Upstream commit fe0ebeafc3b723b2f8edf27ecec6d353b08397df ]
-
-Our static checker found a bug where set_serial_info() uses a mutex, but
-get_serial_info() does not. Fortunately, the impact of this is relatively
-minor. It doesn't cause a crash or any other serious issues. However, if a
-race condition occurs between set_serial_info() and get_serial_info(),
-there is a chance that the data returned by get_serial_info() will be
-meaningless.
-
-Signed-off-by: Qiu-ji Chen <chenqiuji666@gmail.com>
-Fixes: 0aad5ad563c8 ("greybus/uart: switch to ->[sg]et_serial()")
-Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
-Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
-Reviewed-by: Alex Elder <elder@riscstar.com>
-Link: https://lore.kernel.org/r/20241107113337.402042-1-chenqiuji666@gmail.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/staging/greybus/uart.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c
-index 90ff07f2cbf76..2d6c4ae8482d1 100644
---- a/drivers/staging/greybus/uart.c
-+++ b/drivers/staging/greybus/uart.c
-@@ -597,11 +597,13 @@ static int get_serial_info(struct tty_struct *tty,
-       struct gb_tty *gb_tty = tty->driver_data;
-       ss->line = gb_tty->minor;
-+      mutex_lock(&gb_tty->port.mutex);
-       ss->close_delay = jiffies_to_msecs(gb_tty->port.close_delay) / 10;
-       ss->closing_wait =
-               gb_tty->port.closing_wait == ASYNC_CLOSING_WAIT_NONE ?
-               ASYNC_CLOSING_WAIT_NONE :
-               jiffies_to_msecs(gb_tty->port.closing_wait) / 10;
-+      mutex_unlock(&gb_tty->port.mutex);
-       return 0;
- }
--- 
-2.43.0
-
index 2bace1ecfe6c6957673054c88955ce5cabed8209..e0f480b91230759c56eabb8baf5396cefcf702ac 100644 (file)
@@ -609,7 +609,6 @@ phy-realtek-usb-fix-null-deref-in-rtk_usb3phy_probe.patch
 counter-stm32-timer-cnt-add-check-for-clk_enable.patch
 counter-ti-ecap-capture-add-check-for-clk_enable.patch
 bus-mhi-host-switch-trace_mhi_gen_tre-fields-to-nati.patch
-staging-greybus-uart-fix-atomicity-violation-in-get_.patch
 usb-typec-fix-potential-array-underflow-in-ucsi_ccg_.patch
 firmware_loader-fix-possible-resource-leak-in-fw_log.patch
 alsa-hda-realtek-update-alc256-depop-procedure.patch
diff --git a/queue-6.11/staging-greybus-uart-fix-atomicity-violation-in-get_.patch b/queue-6.11/staging-greybus-uart-fix-atomicity-violation-in-get_.patch
deleted file mode 100644 (file)
index 340b08e..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-From e8bafbd69daff04cb6743120a3fdb4ef5c14b59c Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 7 Nov 2024 19:33:37 +0800
-Subject: staging: greybus: uart: Fix atomicity violation in get_serial_info()
-
-From: Qiu-ji Chen <chenqiuji666@gmail.com>
-
-[ Upstream commit fe0ebeafc3b723b2f8edf27ecec6d353b08397df ]
-
-Our static checker found a bug where set_serial_info() uses a mutex, but
-get_serial_info() does not. Fortunately, the impact of this is relatively
-minor. It doesn't cause a crash or any other serious issues. However, if a
-race condition occurs between set_serial_info() and get_serial_info(),
-there is a chance that the data returned by get_serial_info() will be
-meaningless.
-
-Signed-off-by: Qiu-ji Chen <chenqiuji666@gmail.com>
-Fixes: 0aad5ad563c8 ("greybus/uart: switch to ->[sg]et_serial()")
-Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
-Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
-Reviewed-by: Alex Elder <elder@riscstar.com>
-Link: https://lore.kernel.org/r/20241107113337.402042-1-chenqiuji666@gmail.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/staging/greybus/uart.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c
-index cdf4ebb93b104..8eab94cb06faf 100644
---- a/drivers/staging/greybus/uart.c
-+++ b/drivers/staging/greybus/uart.c
-@@ -596,11 +596,13 @@ static int get_serial_info(struct tty_struct *tty,
-       struct gb_tty *gb_tty = tty->driver_data;
-       ss->line = gb_tty->minor;
-+      mutex_lock(&gb_tty->port.mutex);
-       ss->close_delay = jiffies_to_msecs(gb_tty->port.close_delay) / 10;
-       ss->closing_wait =
-               gb_tty->port.closing_wait == ASYNC_CLOSING_WAIT_NONE ?
-               ASYNC_CLOSING_WAIT_NONE :
-               jiffies_to_msecs(gb_tty->port.closing_wait) / 10;
-+      mutex_unlock(&gb_tty->port.mutex);
-       return 0;
- }
--- 
-2.43.0
-
index bcd8c25187fd6c160e634d521f9115459771af4b..31f0099c266f289bd00c68a6eab00ea5ceb9679d 100644 (file)
@@ -606,7 +606,6 @@ phy-realtek-usb-fix-null-deref-in-rtk_usb3phy_probe.patch
 counter-stm32-timer-cnt-add-check-for-clk_enable.patch
 counter-ti-ecap-capture-add-check-for-clk_enable.patch
 bus-mhi-host-switch-trace_mhi_gen_tre-fields-to-nati.patch
-staging-greybus-uart-fix-atomicity-violation-in-get_.patch
 usb-typec-fix-potential-array-underflow-in-ucsi_ccg_.patch
 firmware_loader-fix-possible-resource-leak-in-fw_log.patch
 alsa-hda-realtek-update-alc256-depop-procedure.patch
diff --git a/queue-6.12/staging-greybus-uart-fix-atomicity-violation-in-get_.patch b/queue-6.12/staging-greybus-uart-fix-atomicity-violation-in-get_.patch
deleted file mode 100644 (file)
index e41c2d9..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-From 61937fd741031632e0a1337553e51b754748ca0d Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 7 Nov 2024 19:33:37 +0800
-Subject: staging: greybus: uart: Fix atomicity violation in get_serial_info()
-
-From: Qiu-ji Chen <chenqiuji666@gmail.com>
-
-[ Upstream commit fe0ebeafc3b723b2f8edf27ecec6d353b08397df ]
-
-Our static checker found a bug where set_serial_info() uses a mutex, but
-get_serial_info() does not. Fortunately, the impact of this is relatively
-minor. It doesn't cause a crash or any other serious issues. However, if a
-race condition occurs between set_serial_info() and get_serial_info(),
-there is a chance that the data returned by get_serial_info() will be
-meaningless.
-
-Signed-off-by: Qiu-ji Chen <chenqiuji666@gmail.com>
-Fixes: 0aad5ad563c8 ("greybus/uart: switch to ->[sg]et_serial()")
-Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
-Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
-Reviewed-by: Alex Elder <elder@riscstar.com>
-Link: https://lore.kernel.org/r/20241107113337.402042-1-chenqiuji666@gmail.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/staging/greybus/uart.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c
-index cdf4ebb93b104..8eab94cb06faf 100644
---- a/drivers/staging/greybus/uart.c
-+++ b/drivers/staging/greybus/uart.c
-@@ -596,11 +596,13 @@ static int get_serial_info(struct tty_struct *tty,
-       struct gb_tty *gb_tty = tty->driver_data;
-       ss->line = gb_tty->minor;
-+      mutex_lock(&gb_tty->port.mutex);
-       ss->close_delay = jiffies_to_msecs(gb_tty->port.close_delay) / 10;
-       ss->closing_wait =
-               gb_tty->port.closing_wait == ASYNC_CLOSING_WAIT_NONE ?
-               ASYNC_CLOSING_WAIT_NONE :
-               jiffies_to_msecs(gb_tty->port.closing_wait) / 10;
-+      mutex_unlock(&gb_tty->port.mutex);
-       return 0;
- }
--- 
-2.43.0
-
index 3119aa2cd96b3b3eb236a3538dd8ac2d5ac1ac89..a4c667c287352759e299880d26f3bda9f0e3c2e7 100644 (file)
@@ -439,7 +439,6 @@ usb-chaoskey-fix-possible-deadlock-chaoskey_list_loc.patch
 misc-apds990x-fix-missing-pm_runtime_disable.patch
 counter-stm32-timer-cnt-add-check-for-clk_enable.patch
 counter-ti-ecap-capture-add-check-for-clk_enable.patch
-staging-greybus-uart-fix-atomicity-violation-in-get_.patch
 firmware_loader-fix-possible-resource-leak-in-fw_log.patch
 alsa-hda-realtek-update-alc256-depop-procedure.patch
 drm-radeon-add-helper-rdev_to_drm-rdev.patch
diff --git a/queue-6.6/staging-greybus-uart-fix-atomicity-violation-in-get_.patch b/queue-6.6/staging-greybus-uart-fix-atomicity-violation-in-get_.patch
deleted file mode 100644 (file)
index 96a2100..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-From d4311c0085500a28ff42adaf0d7776c9d938a021 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 7 Nov 2024 19:33:37 +0800
-Subject: staging: greybus: uart: Fix atomicity violation in get_serial_info()
-
-From: Qiu-ji Chen <chenqiuji666@gmail.com>
-
-[ Upstream commit fe0ebeafc3b723b2f8edf27ecec6d353b08397df ]
-
-Our static checker found a bug where set_serial_info() uses a mutex, but
-get_serial_info() does not. Fortunately, the impact of this is relatively
-minor. It doesn't cause a crash or any other serious issues. However, if a
-race condition occurs between set_serial_info() and get_serial_info(),
-there is a chance that the data returned by get_serial_info() will be
-meaningless.
-
-Signed-off-by: Qiu-ji Chen <chenqiuji666@gmail.com>
-Fixes: 0aad5ad563c8 ("greybus/uart: switch to ->[sg]et_serial()")
-Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
-Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
-Reviewed-by: Alex Elder <elder@riscstar.com>
-Link: https://lore.kernel.org/r/20241107113337.402042-1-chenqiuji666@gmail.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/staging/greybus/uart.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c
-index 999ce613dca81..a8b794616ec5b 100644
---- a/drivers/staging/greybus/uart.c
-+++ b/drivers/staging/greybus/uart.c
-@@ -596,11 +596,13 @@ static int get_serial_info(struct tty_struct *tty,
-       struct gb_tty *gb_tty = tty->driver_data;
-       ss->line = gb_tty->minor;
-+      mutex_lock(&gb_tty->port.mutex);
-       ss->close_delay = jiffies_to_msecs(gb_tty->port.close_delay) / 10;
-       ss->closing_wait =
-               gb_tty->port.closing_wait == ASYNC_CLOSING_WAIT_NONE ?
-               ASYNC_CLOSING_WAIT_NONE :
-               jiffies_to_msecs(gb_tty->port.closing_wait) / 10;
-+      mutex_unlock(&gb_tty->port.mutex);
-       return 0;
- }
--- 
-2.43.0
-