From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C87DDC38142 for ; Sat, 28 Jan 2023 13:12:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233018AbjA1NMm (ORCPT ); Sat, 28 Jan 2023 08:12:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230502AbjA1NMm (ORCPT ); Sat, 28 Jan 2023 08:12:42 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0B3123D95 for ; Sat, 28 Jan 2023 05:12:40 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 55553B80968 for ; Sat, 28 Jan 2023 13:12:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 961FBC433EF; Sat, 28 Jan 2023 13:12:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1674911558; bh=/ohKBidNsuuDmKNpOlG8qyueJ2tQ5zBmhKbLQN2fHs4=; h=Subject:To:Cc:From:Date:From; b=h22kd8NKfOIVxmiOTbg4xIGGrEHMNxlwmVp8sX4dMYSOWnTnmpdkNffLwXkpcMg+S da3vIMDX8ByStSzYYIoPKwTlh1WDbdALuYr3sBgciyl80WrvAU0uAAdeH7pUJ9Ccfg 53h0Qg9TXUUkRWCLAI5f0P50wGuLjW6tk+3heg3o= Subject: FAILED: patch "[PATCH] cifs: Fix oops due to uncleared server->smbd_conn in" failed to apply to 4.19-stable tree To: dhowells@redhat.com, longli@microsoft.com, lsahlber@redhat.com, pc@cjr.nz, piastryyy@gmail.com, stfrench@microsoft.com, tom@talpey.com Cc: From: Date: Sat, 28 Jan 2023 14:12:34 +0100 Message-ID: <1674911554100156@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.19-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . Possible dependencies: b7ab9161cf5d ("cifs: Fix oops due to uncleared server->smbd_conn in reconnect") thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From b7ab9161cf5ddc42a288edf9d1a61f3bdffe17c7 Mon Sep 17 00:00:00 2001 From: David Howells Date: Wed, 25 Jan 2023 14:02:13 +0000 Subject: [PATCH] cifs: Fix oops due to uncleared server->smbd_conn in reconnect In smbd_destroy(), clear the server->smbd_conn pointer after freeing the smbd_connection struct that it points to so that reconnection doesn't get confused. Fixes: 8ef130f9ec27 ("CIFS: SMBD: Implement function to destroy a SMB Direct connection") Cc: stable@vger.kernel.org Reviewed-by: Paulo Alcantara (SUSE) Acked-by: Tom Talpey Signed-off-by: David Howells Cc: Long Li Cc: Pavel Shilovsky Cc: Ronnie Sahlberg Signed-off-by: Steve French diff --git a/fs/cifs/smbdirect.c b/fs/cifs/smbdirect.c index 90789aaa6567..8c816b25ce7c 100644 --- a/fs/cifs/smbdirect.c +++ b/fs/cifs/smbdirect.c @@ -1405,6 +1405,7 @@ void smbd_destroy(struct TCP_Server_Info *server) destroy_workqueue(info->workqueue); log_rdma_event(INFO, "rdma session destroyed\n"); kfree(info); + server->smbd_conn = NULL; } /*