FAILED: patch "[PATCH] media: rc: ttusbir: respect DMA coherency rules" failed to apply to 6.6-stable tree
[email protected]
maintainerThe patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x 50acaad3d202c064779db8dc3d010007347f59c7
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026050122-heavily-consult-ca03@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 50acaad3d202c064779db8dc3d010007347f59c7 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <[email protected]>
Date: Wed, 11 Feb 2026 19:11:04 +0100
Subject: [PATCH] media: rc: ttusbir: respect DMA coherency rules
Buffers must not share a cache line with other data structures. Allocate separately.
drivers/media/rc/ttusbir.c +9 -4
@@ -32,7 +32,7 @@ struct ttusbir {struct led_classdev led;struct urb *bulk_urb; -uint8_t bulk_buffer[5 ]; +u8 *bulk_buffer;int bulk_out_endp, iso_in_endp;bool led_on, is_led_on;atomic_t led_complete;
@@ -186,13 +186,16 @@ static int ttusbir_probe(struct usb_interface *intf,struct rc_dev *rc;int i, j, ret;int altsetting =-1 ; +u8 *buffer; tt =kzalloc_obj (*tt); + buffer =kzalloc (5 ,GFP_KERNEL ); rc =rc_allocate_device (RC_DRIVER_IR_RAW ); -if (!tt || !rc) { +if (!tt || !rc || buffer) { ret = -ENOMEM ; goto out; } + tt->bulk_buffer = buffer;/* find the correct alt setting */ for (i =0 ; i < intf->num_altsetting && altsetting ==-1 ; i++) {
@@ -281,8 +284,8 @@ static int ttusbir_probe(struct usb_interface *intf, tt->bulk_buffer[3 ] =0x01 ;usb_fill_bulk_urb (tt->bulk_urb, tt->udev,usb_sndbulkpipe (tt->udev, - tt->bulk_out_endp), tt->bulk_buffer,sizeof (tt->bulk_buffer), - ttusbir_bulk_complete, tt); + tt->bulk_out_endp), tt->bulk_buffer,5 , + ttusbir_bulk_complete, tt); tt->led.name ="ttusbir:green:power" ; tt->led.default_trigger ="rc-feedback" ;
@@ -350,6 +353,7 @@ static int ttusbir_probe(struct usb_interface *intf,kfree (tt); }rc_free_device (rc); +kfree (buffer);return ret; }
@@ -373,6 +377,7 @@ static void ttusbir_disconnect(struct usb_interface *intf)usb_kill_urb (tt->bulk_urb);usb_free_urb (tt->bulk_urb);rc_free_device (tt->rc); +kfree (tt->bulk_buffer);usb_set_intfdata (intf,NULL );kfree (tt); }
Sasha Levin
maintainerPATCH 1/1 media: rc: ttusbir: respect DMA coherency rules
From: Oliver Neukum <[email protected]>
[ Upstream commit 50acaad3d202c064779db8dc3d010007347f59c7 ]
Buffers must not share a cache line with other data structures. Allocate separately.
--- drivers/media/rc/ttusbir.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
drivers/media/rc/ttusbir.c +9 -4
@@ -32,7 +32,7 @@ struct ttusbir {struct led_classdev led;struct urb *bulk_urb; -uint8_t bulk_buffer[5 ]; +u8 *bulk_buffer;int bulk_out_endp, iso_in_endp;bool led_on, is_led_on;atomic_t led_complete;
@@ -186,13 +186,16 @@ static int ttusbir_probe(struct usb_interface *intf,struct rc_dev *rc;int i, j, ret;int altsetting =-1 ; +u8 *buffer; tt =kzalloc (sizeof (*tt),GFP_KERNEL ); + buffer =kzalloc (5 ,GFP_KERNEL ); rc =rc_allocate_device (RC_DRIVER_IR_RAW ); -if (!tt || !rc) { +if (!tt || !rc || buffer) { ret = -ENOMEM ; goto out; } + tt->bulk_buffer = buffer;/* find the correct alt setting */ for (i =0 ; i < intf->num_altsetting && altsetting ==-1 ; i++) {
@@ -281,8 +284,8 @@ static int ttusbir_probe(struct usb_interface *intf, tt->bulk_buffer[3 ] =0x01 ;usb_fill_bulk_urb (tt->bulk_urb, tt->udev,usb_sndbulkpipe (tt->udev, - tt->bulk_out_endp), tt->bulk_buffer,sizeof (tt->bulk_buffer), - ttusbir_bulk_complete, tt); + tt->bulk_out_endp), tt->bulk_buffer,5 , + ttusbir_bulk_complete, tt); tt->led.name ="ttusbir:green:power" ; tt->led.default_trigger ="rc-feedback" ;
@@ -351,6 +354,7 @@ static int ttusbir_probe(struct usb_interface *intf,kfree (tt); }rc_free_device (rc); +kfree (buffer);return ret; }
@@ -373,6 +377,7 @@ static void ttusbir_disconnect(struct usb_interface *intf) }usb_kill_urb (tt->bulk_urb);usb_free_urb (tt->bulk_urb); +kfree (tt->bulk_buffer);usb_set_intfdata (intf,NULL );kfree (tt); }
Signature · 1 line
2.53.0