Skip to contentSkip to conversation

fix usbhid using GFP_KERNEL in interrupt

PATCH In review Oliver Neukum 4 participants 4 messages Sep 21, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix usbhid using GFP_KERNEL in interrupt

hid:usbhid: fix wrong use of GFP_KERNEL

hid_input_report() must be told it is called in interrupt context

Hi Jiri, Greg,

this should go into the current tree and the stable tree.

Regards
Oliver

--
commit ca5c4a1397d1a1c0d1074f4d8922630fdd732780

Author: Oliver Neukum <[email protected]>
Date:   Mon Sep 21 22:02:01 2009 +0200

hid:usbhid: fix wrong use of GFP_KERNEL

hid_input_report() must be told it is called in interrupt context

drivers/hid/usbhid/hid-core.c +1 -1
index 1b0e07a..ab2869d 100644
@@ -455,7 +455,7 @@ static void hid_ctrl(struct urb *urb)
 		if (usbhid->ctrl[usbhid->ctrltail].dir == USB_DIR_IN)
 			hid_input_report(urb->context,
 				usbhid->ctrl[usbhid->ctrltail].report->type,
-				urb->transfer_buffer, urb->actual_length, 0);
+				urb->transfer_buffer, urb->actual_length, 1);
 		break;
 	case -ESHUTDOWN:	/* unplug */
 		unplug = 1;

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#1 lore raw
Quoted 9 lines · Oliver Neukum

hid:usbhid: fix wrong use of GFP_KERNEL

hid_input_report() must be told it is called in interrupt context

Hi Jiri, Greg,

this should go into the current tree and the stable tree.

Stable? Interestingly I did not have any problems with 2.6.31......

/Henk

Quoted 28 lines

Regards
Oliver

--
commit ca5c4a1397d1a1c0d1074f4d8922630fdd732780

Author: Oliver Neukum <[email protected]>
Date:   Mon Sep 21 22:02:01 2009 +0200

hid:usbhid: fix wrong use of GFP_KERNEL

hid_input_report() must be told it is called in interrupt context

drivers/hid/usbhid/hid-core.c +1 -1
index 1b0e07a..ab2869d 100644
@@ -455,7 +455,7 @@ static void hid_ctrl(struct urb *urb)
 		if (usbhid->ctrl[usbhid->ctrltail].dir == USB_DIR_IN)
 			hid_input_report(urb->context,
 				usbhid->ctrl[usbhid->ctrltail].report->type,
-				urb->transfer_buffer, urb->actual_length, 0);
+				urb->transfer_buffer, urb->actual_length, 1);
 		break;
 	case -ESHUTDOWN:	/* unplug */
 		unplug = 1;
#2 lore raw

Am Montag, 21. September 2009 22:33:53 schrieb Henk Martijn:

Quoted 5 lines
Quoted 4 lines · Oliver Neukum

hid:usbhid: fix wrong use of GFP_KERNEL

hid_input_report() must be told it is called in interrupt context

Quoted 7 lines
Quoted 5 lines

Hi Jiri, Greg,

this should go into the current tree and the stable tree.

Stable? Interestingly I did not have any problems with 2.6.31......

OK, Greg, hold your fire. Jiri is this necessary in stable?

Regards
Oliver

#3 lore raw
Quoted 6 lines · Oliver Neukum
Quoted 6 lines
Quoted 6 lines

hid:usbhid: fix wrong use of GFP_KERNEL

hid_input_report() must be told it is called in interrupt context

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Hi Jiri, Greg,

this should go into the current tree and the stable tree.

Stable? Interestingly I did not have any problems with 2.6.31......

OK, Greg, hold your fire. Jiri is this necessary in stable?

Hi,

no, it's not. 2.6.31 doesn't do any allocation in hid_input_report(), this is new with HID debugging through debugfs that went to Linus in 2.6.32 merge window.

The fix for this particular problem is already on its way upstream, waiting for Linus to pull.

Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs, Novell Inc.