From: Thomas Fourier fourier.thomas@gmail.com
[ Upstream commit c4890963350dcf4e9a909bae23665921fba4ad27 ]
The DMA map functions can fail and should be tested for errors.
Signed-off-by: Thomas Fourier fourier.thomas@gmail.com Reviewed-by: Simon Horman horms@kernel.org Link: https://patch.msgid.link/20250624064148.12815-3-fourier.thomas@gmail.com Signed-off-by: Jakub Kicinski kuba@kernel.org Signed-off-by: Sasha Levin sashal@kernel.org ---
**YES**
This commit should be backported to stable kernel trees.
## Detailed Analysis:
**Nature of the fix:** The commit adds missing error checking for `dma_map_single()` calls in two locations within the idt77252 ATM driver:
1. **In `queue_skb()` function (line 853-854):** ```c IDT77252_PRV_PADDR(skb) = dma_map_single(&card->pcidev->dev, skb->data, skb->len, DMA_TO_DEVICE); +if (dma_mapping_error(&card->pcidev->dev, IDT77252_PRV_PADDR(skb))) + return -ENOMEM; ``` This correctly returns -ENOMEM before reaching the errout label, avoiding any cleanup issues since the DMA mapping never succeeded.
2. **In `add_rx_skb()` function (line 1857-1860):** ```c paddr = dma_map_single(&card->pcidev->dev, skb->data, skb_end_pointer(skb) - skb->data, DMA_FROM_DEVICE); +if (dma_mapping_error(&card->pcidev->dev, paddr)) + goto outpoolrm; ``` This properly jumps to the new `outpoolrm` label which removes the SKB from the pool before freeing it, maintaining correct cleanup order.
**Why this qualifies for stable backporting:**
1. **Fixes a real bug**: Missing DMA mapping error checks can cause system crashes or data corruption, especially on systems with IOMMU or SWIOTLB where DMA mapping failures are more likely.
2. **Simple and contained**: The fix adds only 5 lines of error checking code with no architectural changes.
3. **Similar to approved backports**: This follows the exact same pattern as Similar Commits #1 (eni driver) and #2 (aic94xx driver) which were both marked "YES" for backporting.
4. **Long-standing issue**: The driver has existed since at least 2005 (Linux 2.6.12-rc2), meaning this bug has been present for nearly 20 years.
5. **Minimal regression risk**: The changes only add error checking; they don't modify any existing logic paths.
6. **Proper error handling**: Both error paths are correctly implemented with appropriate cleanup sequences.
The commit clearly meets all stable tree criteria as an important bug fix with minimal risk and should be backported to protect users from potential DMA-related crashes.
drivers/atm/idt77252.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c index 06e2fea1ffa92..03b3b9c7c8b5c 100644 --- a/drivers/atm/idt77252.c +++ b/drivers/atm/idt77252.c @@ -849,6 +849,8 @@ queue_skb(struct idt77252_dev *card, struct vc_map *vc,
IDT77252_PRV_PADDR(skb) = dma_map_single(&card->pcidev->dev, skb->data, skb->len, DMA_TO_DEVICE); + if (dma_mapping_error(&card->pcidev->dev, IDT77252_PRV_PADDR(skb))) + return -ENOMEM;
error = -EINVAL;
@@ -1862,6 +1864,8 @@ add_rx_skb(struct idt77252_dev *card, int queue, paddr = dma_map_single(&card->pcidev->dev, skb->data, skb_end_pointer(skb) - skb->data, DMA_FROM_DEVICE); + if (dma_mapping_error(&card->pcidev->dev, paddr)) + goto outpoolrm; IDT77252_PRV_PADDR(skb) = paddr;
if (push_rx_skb(card, skb, queue)) { @@ -1876,6 +1880,7 @@ add_rx_skb(struct idt77252_dev *card, int queue, dma_unmap_single(&card->pcidev->dev, IDT77252_PRV_PADDR(skb), skb_end_pointer(skb) - skb->data, DMA_FROM_DEVICE);
+outpoolrm: handle = IDT77252_PRV_POOL(skb); card->sbpool[POOL_QUEUE(handle)].skb[POOL_INDEX(handle)] = NULL;
From: Xiaowei Li xiaowei.li@simcom.com
[ Upstream commit 0b39b055b5b48cbbdf5746a1ca6e3f6b0221e537 ]
Add support for SIMCom 8230C which is based on Qualcomm SDX35 chip. 0x9071: tty (DM) + tty (NMEA) + tty (AT) + rmnet T: Bus=01 Lev=01 Prnt=01 Port=05 Cnt=02 Dev#= 8 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1e0e ProdID=9071 Rev= 5.15 S: Manufacturer=SIMCOM S: Product=SDXBAAGHA-IDP _SN:D744C4C5 S: SerialNumber=0123456789ABCDEF C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan E: Ad=86(I) Atr=03(Int.) MxPS= 8 Ivl=32ms E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=none E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
Signed-off-by: Xiaowei Li xiaowei.li@simcom.com Acked-by: Bjørn Mork bjorn@mork.no Link: https://patch.msgid.link/tencent_21D781FAA4969FEACA6ABB460362B52C9409@qq.com Signed-off-by: Jakub Kicinski kuba@kernel.org Signed-off-by: Sasha Levin sashal@kernel.org ---
**YES**
This commit should be backported to stable kernel trees. Here's my detailed analysis:
## Rationale for Backporting:
1. **Stable kernel rules explicitly allow device ID additions**: According to Documentation/process/stable-kernel-rules.rst line 15, patches must "either fix a real bug that bothers people or just add a device ID." This commit clearly falls into the "add a device ID" category.
2. **Simple, low-risk change**: The commit adds exactly one line: ```c {QMI_QUIRK_SET_DTR(0x1e0e, 0x9071, 3)}, /* SIMCom 8230C ++ */ ``` This is a minimal change that only affects users with this specific hardware (vendor ID 0x1e0e, product ID 0x9071).
3. **Enables hardware that would otherwise not work**: Without this device ID entry, users with the SIMCom 8230C modem cannot use their hardware with the qmi_wwan driver. This directly impacts functionality for those users.
4. **Follows established patterns**: The commit uses `QMI_QUIRK_SET_DTR` macro, consistent with the existing SIMCom entry at line 1428: ```c {QMI_QUIRK_SET_DTR(0x1e0e, 0x9001, 5)}, /* SIMCom 7100E, 7230E, 7600E ++ */ ``` This shows the vendor has a history of requiring the DTR quirk for their devices.
5. **Historical precedent supports backporting**: Of the 5 similar commits analyzed, 4 were backported to stable: - Fibocom FG132 (YES) - MeiG Smart SRM825L (YES) - Telit FN912 compositions (YES) - Telit FN920C04 compositions (YES) - Quectel RG255C (NO)
The 80% backport rate for similar device ID additions suggests this type of change is generally considered appropriate for stable.
6. **No risk to existing functionality**: The change only adds support for a new device ID (0x9071) and doesn't modify any existing device support or core driver functionality.
The commit meets all criteria for stable backporting: it's obviously correct, tested (as evidenced by the detailed USB descriptor output in the commit message), small (1 line), and enables hardware support that users need.
drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index d0032db3e9f40..496cff5f3d0a3 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c @@ -1382,6 +1382,7 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x03f0, 0x9d1d, 1)}, /* HP lt4120 Snapdragon X5 LTE */ {QMI_FIXED_INTF(0x22de, 0x9061, 3)}, /* WeTelecom WPD-600N */ {QMI_QUIRK_SET_DTR(0x1e0e, 0x9001, 5)}, /* SIMCom 7100E, 7230E, 7600E ++ */ + {QMI_QUIRK_SET_DTR(0x1e0e, 0x9071, 3)}, /* SIMCom 8230C ++ */ {QMI_QUIRK_SET_DTR(0x2c7c, 0x0121, 4)}, /* Quectel EC21 Mini PCIe */ {QMI_QUIRK_SET_DTR(0x2c7c, 0x0191, 4)}, /* Quectel EG91 */ {QMI_QUIRK_SET_DTR(0x2c7c, 0x0195, 4)}, /* Quectel EG95 */
From: Nicolas Pitre npitre@baylibre.com
[ Upstream commit ff78538e07fa284ce08cbbcb0730daa91ed16722 ]
Programs using poll() on /dev/vcsa to be notified when VT changes occur were missing one case: the switch from gfx to text mode.
Signed-off-by: Nicolas Pitre npitre@baylibre.com Link: https://lore.kernel.org/r/9o5ro928-0pp4-05rq-70p4-ro385n21n723@onlyvoer.pbz Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org Signed-off-by: Sasha Levin sashal@kernel.org ---
**YES**
This commit should be backported to stable kernel trees for the following reasons:
1. **It fixes a real bug affecting userspace programs**: The commit addresses a missing notification that prevents programs using `poll()` on `/dev/vcsa` from being properly notified when the VT switches from graphics mode back to text mode. This is a functional regression that breaks userspace applications monitoring VT state changes.
2. **The fix is minimal and low-risk**: The change adds only a single line - `notify_update(vc);` - in the `do_unblank_screen()` function. This follows an established pattern where `notify_update()` is called after VT state changes to notify userspace watchers.
3. **Consistent with existing code patterns**: Looking at the codebase, `notify_update()` is already called in similar contexts throughout vt.c. For example, in `vc_do_resize()`, we see: ```c vt_event_post(VT_EVENT_RESIZE, vc->vc_num, vc->vc_num); notify_update(vc); ``` The same pattern should apply when unblanking the screen.
4. **Similar commits were backported**: The historical commits provided show that previous fixes adding or correcting `notify_update()` calls were marked for stable backporting (all three YES examples had `Cc: stable@vger.kernel.org`). These commits fixed similar issues where userspace poll() notifications were missing.
5. **Clear symptom and fix**: The bug has a clear symptom (missing notifications when switching from graphics to text mode) and a straightforward fix that directly addresses the root cause. The `leaving_gfx` parameter in `do_unblank_screen()` specifically indicates this transition scenario.
6. **No architectural changes**: This is purely a bug fix that restores expected behavior without introducing new features or changing the architecture of the VT subsystem.
The commit meets all the criteria for stable backporting: it fixes an important bug affecting userspace, the fix is minimal and contained, and it follows established patterns for similar fixes that were previously backported.
drivers/tty/vt/vt.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index e58dceaf7ff0e..3db8efd58747d 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -4368,6 +4368,7 @@ void do_unblank_screen(int leaving_gfx) set_palette(vc); set_cursor(vc); vt_event_post(VT_EVENT_UNBLANK, vc->vc_num, vc->vc_num); + notify_update(vc); } EXPORT_SYMBOL(do_unblank_screen);
From: Zhang Heng zhangheng@kylinos.cn
[ Upstream commit 1a8953f4f7746c6a515989774fe03047c522c613 ]
MARTLINKTECHNOLOGY is a microphone device, when the HID interface in an audio device is requested to get specific report id, the following error may occur.
[ 562.939373] usb 1-1.4.1.2: new full-speed USB device number 21 using xhci_hcd [ 563.104908] usb 1-1.4.1.2: New USB device found, idVendor=4c4a, idProduct=4155, bcdDevice= 1.00 [ 563.104910] usb 1-1.4.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 563.104911] usb 1-1.4.1.2: Product: USB Composite Device [ 563.104912] usb 1-1.4.1.2: Manufacturer: SmartlinkTechnology [ 563.104913] usb 1-1.4.1.2: SerialNumber: 20201111000001 [ 563.229499] input: SmartlinkTechnology USB Composite Device as /devices/pci0000:00/0000:00:07.1/0000:04:00.3/usb1/1-1/1-1.4/1-1.4.1/1-1.4.1.2/1-1.4.1.2:1.2/0003:4C4A:4155.000F/input/input35 [ 563.291505] hid-generic 0003:4C4A:4155.000F: input,hidraw2: USB HID v2.01 Keyboard [SmartlinkTechnology USB Composite Device] on usb-0000:04:00.3-1.4.1.2/input2 [ 563.291557] usbhid 1-1.4.1.2:1.3: couldn't find an input interrupt endpoint [ 568.506654] usb 1-1.4.1.2: 1:1: usb_set_interface failed (-110) [ 573.626656] usb 1-1.4.1.2: 1:1: usb_set_interface failed (-110) [ 578.746657] usb 1-1.4.1.2: 1:1: usb_set_interface failed (-110) [ 583.866655] usb 1-1.4.1.2: 1:1: usb_set_interface failed (-110) [ 588.986657] usb 1-1.4.1.2: 1:1: usb_set_interface failed (-110)
Ignore HID interface. The device is working properly.
Signed-off-by: Zhang Heng zhangheng@kylinos.cn Signed-off-by: Jiri Kosina jkosina@suse.com Signed-off-by: Sasha Levin sashal@kernel.org ---
**YES**
This commit should be backported to stable kernel trees. Here's my extensive analysis:
1. **The commit fixes a real user-visible bug**: The device causes repeated USB interface timeout errors (`usb_set_interface failed (-110)`) that spam the kernel log and potentially interfere with device operation. The error log shows five consecutive timeout failures over 25 seconds, which would significantly impact user experience.
2. **The fix is minimal and contained**: The code changes are extremely simple - just adding two lines to define the vendor/device ID in `hid-ids.h` and one line to add it to the `hid_ignore_list[]` array in `hid-quirks.c`. This is the standard pattern for HID quirks.
3. **Similar commits were backported**: This is very similar to "Similar Commit #1" (Logitech GROUP) which also dealt with HID interfaces on audio devices causing problems. That commit added `HID_QUIRK_NOGET` and was backported. The pattern is identical - an audio device with a problematic HID interface that needs to be handled via quirks.
4. **No risk of regression**: The change only affects devices with vendor ID 0x4c4a and product ID 0x4155. When a device matches this ID, the HID subsystem will simply skip it via the `hid_ignore()` function check in `hid_add_device()`. This cannot affect any other devices.
5. **The device functions properly with the fix**: The commit message explicitly states "The device is working properly" - meaning the audio functionality works fine once the HID interface is ignored. This is not breaking functionality but rather preventing the HID subsystem from interfering with a working audio device.
6. **The error pattern indicates a hardware quirk**: The continuous timeout errors (-110) when trying to set the USB interface suggests the device's HID implementation doesn't properly respond to standard HID commands. This is exactly the type of hardware-specific issue that the HID quirks system was designed to handle.
This meets all the criteria for stable backporting: it fixes a bug affecting users, is small and self-contained, has minimal risk, and follows established patterns for similar fixes that were previously backported.
drivers/hid/hid-ids.h | 3 +++ drivers/hid/hid-quirks.c | 1 + 2 files changed, 4 insertions(+)
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 356916608cc49..3787bd508b616 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -1347,4 +1347,7 @@ #define USB_VENDOR_ID_SIGNOTEC 0x2133 #define USB_DEVICE_ID_SIGNOTEC_VIEWSONIC_PD1011 0x0018
+#define USB_VENDOR_ID_SMARTLINKTECHNOLOGY 0x4c4a +#define USB_DEVICE_ID_SMARTLINKTECHNOLOGY_4155 0x4155 + #endif diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c index ff1a9d142cddf..2cf58e3016e7b 100644 --- a/drivers/hid/hid-quirks.c +++ b/drivers/hid/hid-quirks.c @@ -879,6 +879,7 @@ static const struct hid_device_id hid_ignore_list[] = { #endif { HID_USB_DEVICE(USB_VENDOR_ID_YEALINK, USB_DEVICE_ID_YEALINK_P1K_P4K_B2K) }, { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_HP_5MP_CAMERA_5473) }, + { HID_USB_DEVICE(USB_VENDOR_ID_SMARTLINKTECHNOLOGY, USB_DEVICE_ID_SMARTLINKTECHNOLOGY_4155) }, { } };
From: "Chia-Lin Kao (AceLan)" acelan.kao@canonical.com
[ Upstream commit 54bae4c17c11688339eb73a04fd24203bb6e7494 ]
The Chicony Electronics HP 5MP Cameras (USB ID 04F2:B824 & 04F2:B82C) report a HID sensor interface that is not actually implemented. Attempting to access this non-functional sensor via iio_info causes system hangs as runtime PM tries to wake up an unresponsive sensor.
Add these 2 devices to the HID ignore list since the sensor interface is non-functional by design and should not be exposed to userspace.
Signed-off-by: Chia-Lin Kao (AceLan) acelan.kao@canonical.com Signed-off-by: Jiri Kosina jkosina@suse.com Signed-off-by: Sasha Levin sashal@kernel.org ---
**YES**
This commit should be backported to stable kernel trees. Here's my extensive analysis:
## Key Characteristics of This Commit:
1. **Fixes a Critical User-Facing Bug**: The commit addresses system hangs that occur when userspace attempts to access non-functional HID sensor interfaces through iio_info. This is a serious usability issue that can make the system unresponsive.
2. **Minimal and Contained Changes**: The patch only adds two device IDs to existing infrastructure: - In `drivers/hid/hid-ids.h`: Added `USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA` (0xb824) and `USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA2` (0xb82c) - In `drivers/hid/hid-quirks.c`: Added these two devices to the `hid_ignore_list[]` array
3. **Zero Risk of Regression**: The changes only affect the specific USB devices (04F2:B824 and 04F2:B82C). No existing functionality is modified, and no code logic is changed.
## Comparison with Similar Commits:
This commit is nearly identical to **Similar Commit #1** (which was backported), where a QUANTA HP 5MP Camera (0408:5473) was added to the ignore list for the exact same reason - non-functional sensor causing system hangs. Both commits: - Target HP 5MP cameras with non-functional sensors - Use the same fix approach (adding to HID ignore list) - Prevent system hangs when accessing the sensor
## Alignment with Stable Kernel Rules:
The commit perfectly aligns with stable tree criteria: - **Fixes a real bug**: System hangs are critical issues - **Already in Linus' tree**: Signed-off by Jiri Kosina (HID maintainer) - **Small change**: Only 4 lines of actual code changes - **Obviously correct**: Simply adding device IDs to an ignore list - **No new features**: Pure bugfix - **Hardware-specific**: Only affects users with these specific cameras
## Historical Precedent:
Looking at the provided similar commits: - 4 out of 5 hardware quirk commits were backported (80% backport rate) - All commits fixing system hangs or device disconnections were backported - The only non-backported commit (#4) involved architectural changes to enum handling
This commit follows the exact pattern of successfully backported hardware quirks, making it an excellent candidate for stable inclusion.
drivers/hid/hid-ids.h | 2 ++ drivers/hid/hid-quirks.c | 2 ++ 2 files changed, 4 insertions(+)
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 3787bd508b616..d2e355a9744a0 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -280,6 +280,8 @@ #define USB_DEVICE_ID_ASUS_AK1D 0x1125 #define USB_DEVICE_ID_CHICONY_TOSHIBA_WT10A 0x1408 #define USB_DEVICE_ID_CHICONY_ACER_SWITCH12 0x1421 +#define USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA 0xb824 +#define USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA2 0xb82c
#define USB_VENDOR_ID_CHUNGHWAT 0x2247 #define USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH 0x0001 diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c index 2cf58e3016e7b..d1cfd45f2585a 100644 --- a/drivers/hid/hid-quirks.c +++ b/drivers/hid/hid-quirks.c @@ -732,6 +732,8 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_AVERMEDIA, USB_DEVICE_ID_AVER_FM_MR800) }, { HID_USB_DEVICE(USB_VENDOR_ID_AXENTIA, USB_DEVICE_ID_AXENTIA_FM_RADIO) }, { HID_USB_DEVICE(USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD) }, + { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA) }, + { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA2) }, { HID_USB_DEVICE(USB_VENDOR_ID_CIDC, 0x0103) }, { HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_RADIO_SI470X) }, { HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_RADIO_SI4713) },
linux-stable-mirror@lists.linaro.org