Re: [PATCH] usbip: fix vhci races in connection tear down

2021-03-12 Thread Shuah Khan
On 3/12/21 12:08 AM, Hillf Danton wrote: On Thu, 11 Mar 2021 19:27:37 -0700 Shuah Khan wrote: vhci_shutdown_connection() references connection state (tcp_socket, tcp_rx, tcp_tx, sockfd) saved in usbpip_device without holding the lock. Current connection tear down sequence: Step 1: shutdown

Re: [PATCH] usbip: fix vhci races in connection tear down

2021-03-12 Thread Shuah Khan
On 3/12/21 3:45 AM, Johan Hovold wrote: On Thu, Mar 11, 2021 at 07:27:37PM -0700, Shuah Khan wrote: vhci_shutdown_connection() references connection state (tcp_socket, tcp_rx, tcp_tx, sockfd) saved in usbpip_device without holding the lock. Current connection tear down sequence: Step 1:

Re: [PATCH] usbip: fix vhci races in connection tear down

2021-03-12 Thread Johan Hovold
On Thu, Mar 11, 2021 at 07:27:37PM -0700, Shuah Khan wrote: > vhci_shutdown_connection() references connection state (tcp_socket, > tcp_rx, tcp_tx, sockfd) saved in usbpip_device without holding the > lock. > > Current connection tear down sequence: > Step 1: shutdown the socket > Step 2: stop rx

[PATCH] usbip: fix vhci races in connection tear down

2021-03-11 Thread Shuah Khan
vhci_shutdown_connection() references connection state (tcp_socket, tcp_rx, tcp_tx, sockfd) saved in usbpip_device without holding the lock. Current connection tear down sequence: Step 1: shutdown the socket Step 2: stop rx thread and reset tcp_rx pointer Step 3: stop tx thread and reset tcp_tx