All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch]fix usbhid using GFP_KERNEL in interrupt
@ 2009-09-21 20:25 Oliver Neukum
  2009-09-21 20:33 ` Henk Martijn
  0 siblings, 1 reply; 4+ messages in thread
From: Oliver Neukum @ 2009-09-21 20:25 UTC (permalink / raw)
  To: Henk Martijn, linux-input-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Greg KH, Jiri Kosina

hid:usbhid: fix wrong use of GFP_KERNEL
    
hid_input_report() must be told it is called in interrupt context

Signed-off-by: Oliver Neukum <oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>

Hi Jiri, Greg,

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

	Regards
		Oliver

--
commit ca5c4a1397d1a1c0d1074f4d8922630fdd732780
Author: Oliver Neukum <oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
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

diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 1b0e07a..ab2869d 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [patch]fix usbhid using GFP_KERNEL in interrupt
  2009-09-21 20:25 [patch]fix usbhid using GFP_KERNEL in interrupt Oliver Neukum
@ 2009-09-21 20:33 ` Henk Martijn
  2009-09-21 20:37   ` Oliver Neukum
  0 siblings, 1 reply; 4+ messages in thread
From: Henk Martijn @ 2009-09-21 20:33 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-input, linux-usb, Greg KH, Jiri Kosina

Oliver Neukum wrote:
> hid:usbhid: fix wrong use of GFP_KERNEL
>     
> hid_input_report() must be told it is called in interrupt context
> 
> Signed-off-by: Oliver Neukum <oliver@neukum.org>
> 
> 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
> 
> 	Regards
> 		Oliver
> 
> --
> commit ca5c4a1397d1a1c0d1074f4d8922630fdd732780
> Author: Oliver Neukum <oliver@neukum.org>
> 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
> 
> diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
> index 1b0e07a..ab2869d 100644
> --- a/drivers/hid/usbhid/hid-core.c
> +++ b/drivers/hid/usbhid/hid-core.c
> @@ -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;
> 
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch]fix usbhid using GFP_KERNEL in interrupt
  2009-09-21 20:33 ` Henk Martijn
@ 2009-09-21 20:37   ` Oliver Neukum
  2009-09-21 21:42     ` Jiri Kosina
  0 siblings, 1 reply; 4+ messages in thread
From: Oliver Neukum @ 2009-09-21 20:37 UTC (permalink / raw)
  To: Henk Martijn; +Cc: linux-input, linux-usb, Greg KH, Jiri Kosina

Am Montag, 21. September 2009 22:33:53 schrieb Henk Martijn:
> Oliver Neukum wrote:
> > hid:usbhid: fix wrong use of GFP_KERNEL
> >
> > hid_input_report() must be told it is called in interrupt context
> >
> > Signed-off-by: Oliver Neukum <oliver@neukum.org>
> >
> > 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch]fix usbhid using GFP_KERNEL in interrupt
  2009-09-21 20:37   ` Oliver Neukum
@ 2009-09-21 21:42     ` Jiri Kosina
  0 siblings, 0 replies; 4+ messages in thread
From: Jiri Kosina @ 2009-09-21 21:42 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: Henk Martijn, linux-input, linux-usb, Greg KH

On Mon, 21 Sep 2009, Oliver Neukum wrote:

> > > hid:usbhid: fix wrong use of GFP_KERNEL
> > >
> > > hid_input_report() must be told it is called in interrupt context
> > >
> > > Signed-off-by: Oliver Neukum <oliver@neukum.org>
> > >
> > > 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,

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-09-21 21:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-21 20:25 [patch]fix usbhid using GFP_KERNEL in interrupt Oliver Neukum
2009-09-21 20:33 ` Henk Martijn
2009-09-21 20:37   ` Oliver Neukum
2009-09-21 21:42     ` Jiri Kosina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.