linux-stable/drivers/staging/greybus
Qiu-ji Chen fe0ebeafc3 staging: greybus: uart: Fix atomicity violation in get_serial_info()
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: 0aad5ad563 ("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>
2024-11-10 08:02:37 +01:00
..
Documentation staging: greybus: remove license "boilerplate" 2019-08-27 19:02:26 +02:00
arche_platform.h staging: greybus: correct SPDX License Identifier 2018-11-09 09:49:02 -08:00
arche-apb-ctrl.c staging: Switch back to struct platform_driver::remove() 2024-10-09 11:54:53 +02:00
arche-platform.c staging: Switch back to struct platform_driver::remove() 2024-10-09 11:54:53 +02:00
audio_apbridgea.c staging: greybus: move core include files to include/linux/greybus/ 2019-08-27 19:02:59 +02:00
audio_apbridgea.h greybus: audio: apbridgea: Remove flexible array from struct audio_apbridgea_hdr 2024-03-05 13:59:14 +00:00
audio_codec.c staging: greybus: Avoid abusing controls_rwsem 2023-07-20 10:02:59 +02:00
audio_codec.h staging: greybus: Avoid abusing controls_rwsem 2023-07-20 10:02:59 +02:00
audio_gb.c staging: greybus: move core include files to include/linux/greybus/ 2019-08-27 19:02:59 +02:00
audio_helper.c staging: greybus: audio_helper: Use snd_ctl_remove_id() 2023-07-20 10:00:39 +02:00
audio_helper.h staging: greybus: audio: Add helper APIs for dynamic audio modules 2020-07-29 16:40:09 +02:00
audio_manager_module.c staging: greybus: Constify gb_audio_module_type 2024-03-25 18:25:45 +01:00
audio_manager_private.h staging: greybus: Modify lines end with a '(' 2023-10-17 15:42:27 +02:00
audio_manager_sysfs.c staging: greybus: minor code style fix 2021-02-13 22:37:50 +01:00
audio_manager.c staging: greybus: add missing MODULE_DESCRIPTION() macros 2024-06-24 15:17:58 +02:00
audio_manager.h staging: greybus: correct SPDX License Identifier 2018-11-09 09:49:02 -08:00
audio_module.c staging/greybus: eliminate use of NAME_SIZE for strings 2021-03-10 09:25:33 +01:00
audio_topology.c staging: greybus: audio: remove unused struct gb_mixer_control 2024-06-04 13:35:33 +02:00
authentication.c Revert "staging: greybus: Fix capitalization and punctuation inconsistencies" 2024-09-11 15:56:26 +02:00
bootrom.c Revert "staging: greybus: Fix capitalization and punctuation inconsistencies" 2024-09-11 15:56:26 +02:00
camera.c staging: greybus: add missing MODULE_DESCRIPTION() macros 2024-06-24 15:17:58 +02:00
firmware.h staging: greybus: move core include files to include/linux/greybus/ 2019-08-27 19:02:59 +02:00
fw-core.c staging: greybus: fix alignment of open parenthesis 2023-08-22 15:47:55 +02:00
fw-download.c greybus: Avoid fake flexible array for response data 2024-03-05 13:59:43 +00:00
fw-management.c staging: greybus: change strncpy() to strscpy_pad() 2024-04-09 17:53:50 +02:00
gb-camera.h greybus: camera-gb: Fix a alignment bug on gb_camera_ops() 2024-08-13 11:26:33 +02:00
gbphy.c Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
gbphy.h staging: greybus: Add identifier name to function definition argument 2020-08-18 16:07:17 +02:00
gpio.c staging: greybus: gpio: use gpiochip_get_data 2024-11-04 00:50:59 +01:00
greybus_authentication.h staging: greybus: Replace __attribute__((packed)) by __packed in various instances 2024-03-07 21:40:52 +00:00
greybus_firmware.h staging: greybus: Replaces directive __attribute__((packed)) by __packed as suggested by checkpatch 2024-03-07 21:40:52 +00:00
hid.c staging: greybus: add missing MODULE_DESCRIPTION() macros 2024-06-24 15:17:58 +02:00
i2c.c staging: greybus: add missing MODULE_DESCRIPTION() macros 2024-06-24 15:17:58 +02:00
Kconfig leds: Make flash and multicolor dependencies unconditional 2024-03-07 08:48:03 +00:00
light.c Revert "staging: greybus: Fix capitalization and punctuation inconsistencies" 2024-09-11 15:56:26 +02:00
log.c Revert "staging: greybus: Fix capitalization and punctuation inconsistencies" 2024-09-11 15:56:26 +02:00
loopback.c staging: greybus: add missing MODULE_DESCRIPTION() macros 2024-06-24 15:17:58 +02:00
Makefile staging: greybus: audio: Enable GB codec, audio module compilation. 2020-07-29 16:40:26 +02:00
power_supply.c staging: greybus: add missing MODULE_DESCRIPTION() macros 2024-06-24 15:17:58 +02:00
pwm.c staging: greybus: add missing MODULE_DESCRIPTION() macros 2024-06-24 15:17:58 +02:00
raw.c staging: greybus: add missing MODULE_DESCRIPTION() macros 2024-06-24 15:17:58 +02:00
sdio.c staging: greybus: add missing MODULE_DESCRIPTION() macros 2024-06-24 15:17:58 +02:00
spi.c staging: greybus: add missing MODULE_DESCRIPTION() macros 2024-06-24 15:17:58 +02:00
spilib.c staging: greybus: spi: switch to use spi_alloc_host() 2024-09-03 10:32:50 +02:00
spilib.h staging: greybus: fix up SPDX comment in .h files 2019-08-27 19:02:18 +02:00
TODO staging: greybus: Add TODO item about modernizing the pwm code 2020-12-09 15:49:04 +01:00
uart.c staging: greybus: uart: Fix atomicity violation in get_serial_info() 2024-11-10 08:02:37 +01:00
usb.c staging: greybus: add missing MODULE_DESCRIPTION() macros 2024-06-24 15:17:58 +02:00
vibrator.c staging: greybus: add missing MODULE_DESCRIPTION() macros 2024-06-24 15:17:58 +02:00