lkml.org 
[lkml]   [2021]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 4/6] usbip: fix stub_dev usbip_sockfd_store() races leading to gpf
From
Date
On 2021/03/10 9:29, Shuah Khan wrote:
>> It is not a large grain lock. Since event_handler() is exclusively executed, this lock
>> does _NOT_ block event_handler() unless attach/detach operations run concurrently.
>>
>>>
>
> event handler queues the events. It shouldn't be blocked by attach
> and detach. The events could originate for various reasons during
> the host and vhci operations. I don't like using this lock for
> attach and detach.

How can attach/detach deadlock event_handler()?
event_handler() calls e.g. vhci_shutdown_connection() via ud->eh_ops.shutdown(ud).
vhci_shutdown_connection() e.g. waits for termination of tx/rx threads via kthread_stop_put().
event_handler() is already blocked by detach operation.
How it can make situation worse to wait for creation of tx/rx threads in attach operation?

\
 
 \ /
  Last update: 2021-03-10 02:05    [W:0.626 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site