7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Michael Grzeschik [ Upstream commit 08c6b9f484a406d9d87c5b2580725d2e0597f3b9 ] When some tx or rx transfers were pending while closing the connection, the completion handler could catch one pending completion call. To ensure a normal start when mounting again, we have to reset the completion and flush any pending completions. Fixes: a3be076dc174 ("net/9p/usbg: Add new usb gadget function transport") Cc: stable@vger.kernel.org Signed-off-by: Michael Grzeschik Message-ID: <20260922-usb9pfsfixes-v1-3-9d8dcc52904c@kernel.org> Signed-off-by: Dominique Martinet Signed-off-by: Sasha Levin --- net/9p/trans_usbg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/9p/trans_usbg.c b/net/9p/trans_usbg.c index a06d0ac163b0d..ce952a5de4260 100644 --- a/net/9p/trans_usbg.c +++ b/net/9p/trans_usbg.c @@ -469,6 +469,7 @@ static void p9_usbg_close(struct p9_client *client) mutex_unlock(&usb9pfs_lock); disable_usb9pfs(usb9pfs); + reinit_completion(&usb9pfs->send); } static int p9_usbg_request(struct p9_client *client, struct p9_req_t *p9_req) @@ -758,6 +759,7 @@ static void usb9pfs_disable(struct usb_function *f) usb9pfs->client->status = Disconnected; spin_unlock_irqrestore(&usb9pfs->lock, flags); usb9pfs_clear_tx(usb9pfs); + reinit_completion(&usb9pfs->send); } static struct usb_function *usb9pfs_alloc(struct usb_function_instance *fi) -- 2.53.0