Re: [PATCH] hid: usbhid: hid-core: fix recursive deadlock

2015-11-20 Thread Ioan-Adrian Ratiu
On Thu, 19 Nov 2015 22:34:18 +0100 (CET) Jiri Kosina wrote: > Could you please reformulate the changelog in this respect and resubmit? Yes, of course, I tried to reformulate the problem and solution as clear and succint as I could in v2, which I'll send shortly. Thank you very

Re: [PATCH] hid: usbhid: hid-core: fix recursive deadlock

2015-11-19 Thread Jiri Kosina
On Thu, 19 Nov 2015, Ioan-Adrian Ratiu wrote: > First part of lockdep report: > http://imgur.com/clLsCWe > > Second part: > http://imgur.com/Wa2PzRl > > Here are some printk's of mine while reproducing + debugging the issue: > http://imgur.com/SETOHT7 So the real problem is that Intuos driver

Re: [PATCH] hid: usbhid: hid-core: fix recursive deadlock

2015-11-19 Thread Jiri Kosina
On Wed, 18 Nov 2015, Ioan-Adrian Ratiu wrote: > > > The critical section protected by usbhid->lock in hid_ctrl() is too > > > big and in rare cases causes a recursive deadlock because of its call > > > to hid_input_report(). > > > > > > This deadlock reproduces on newer wacom tablets like

Re: [PATCH] hid: usbhid: hid-core: fix recursive deadlock

2015-11-19 Thread Jiri Kosina
On Thu, 19 Nov 2015, Ioan-Adrian Ratiu wrote: > But please understand further my reasoning for submitting this patch. > Consider if this is a bug in the wacom driver or in the usbhid core? IMO > this is a usbhid bug: the critical region in hid_ctrl() is too big, > there is no reason for the

Re: [PATCH] hid: usbhid: hid-core: fix recursive deadlock

2015-11-19 Thread Ioan-Adrian Ratiu
On Thu, 19 Nov 2015 10:10:19 +0100 (CET) Jiri Kosina wrote: > On Thu, 19 Nov 2015, Ioan-Adrian Ratiu wrote: > > > First part of lockdep report: > > http://imgur.com/clLsCWe > > > > Second part: > > http://imgur.com/Wa2PzRl > > > > Here are some printk's of mine while

[PATCH] hid: usbhid: hid-core: fix recursive deadlock

2015-11-18 Thread Ioan-Adrian Ratiu
The critical section protected by usbhid->lock in hid_ctrl() is too big and in rare cases causes a recursive deadlock because of its call to hid_input_report(). This deadlock reproduces on newer wacom tablets like 056a:033c because the wacom driver in its irq handler ends up calling

Re: [PATCH] hid: usbhid: hid-core: fix recursive deadlock

2015-11-18 Thread Ioan-Adrian Ratiu
Here are some images with more information on this deadlock, might be helpful. First part of lockdep report: http://imgur.com/clLsCWe Second part: http://imgur.com/Wa2PzRl Here are some printk's of mine while reproducing + debugging the issue: http://imgur.com/SETOHT7 -- To unsubscribe from

Re: [PATCH] hid: usbhid: hid-core: fix recursive deadlock

2015-11-18 Thread Jiri Kosina
On Wed, 18 Nov 2015, Ioan-Adrian Ratiu wrote: > The critical section protected by usbhid->lock in hid_ctrl() is too > big and in rare cases causes a recursive deadlock because of its call > to hid_input_report(). > > This deadlock reproduces on newer wacom tablets like 056a:033c because > the

Re: [PATCH] hid: usbhid: hid-core: fix recursive deadlock

2015-11-18 Thread Josh Cartwright
On Wed, Nov 18, 2015 at 11:05:44PM +0200, Ioan-Adrian Ratiu wrote: > On Wed, 18 Nov 2015 21:37:42 +0100 (CET) > Jiri Kosina wrote: > > > On Wed, 18 Nov 2015, Ioan-Adrian Ratiu wrote: > > > > > The critical section protected by usbhid->lock in hid_ctrl() is too > > > big and in

Re: [PATCH] hid: usbhid: hid-core: fix recursive deadlock

2015-11-18 Thread Ioan-Adrian Ratiu
On Wed, 18 Nov 2015 17:58:56 -0600 Josh Cartwright wrote: > On Wed, Nov 18, 2015 at 11:05:44PM +0200, Ioan-Adrian Ratiu wrote: > > On Wed, 18 Nov 2015 21:37:42 +0100 (CET) > > Jiri Kosina wrote: > > > > > On Wed, 18 Nov 2015, Ioan-Adrian Ratiu wrote: > > >

Re: [PATCH] hid: usbhid: hid-core: fix recursive deadlock

2015-11-18 Thread Ioan-Adrian Ratiu
On Wed, 18 Nov 2015 21:37:42 +0100 (CET) Jiri Kosina wrote: > On Wed, 18 Nov 2015, Ioan-Adrian Ratiu wrote: > > > The critical section protected by usbhid->lock in hid_ctrl() is too > > big and in rare cases causes a recursive deadlock because of its call > > to