Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2968772rdb; Mon, 4 Dec 2023 12:34:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGXYHEyNggfrbTFsAveGj7efdyUnIMccLkq7nSDPyItJxcfUPseTrF0B1/mMuUZ/CQsClOF X-Received: by 2002:a17:902:7043:b0:1d0:6ffe:1e68 with SMTP id h3-20020a170902704300b001d06ffe1e68mr2664064plt.75.1701722041702; Mon, 04 Dec 2023 12:34:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701722041; cv=none; d=google.com; s=arc-20160816; b=gy9N1W4TshjKuJv9IXZtKpyS9UmfgB3L45yAxf3PGQF5OkmY1SceDHEhugSLkbsV+D kwjT4KssDgFAioxRNbRMOMA5wNA6bZGGXbSC+g3uszEo9xUWJbU6qjooy1CZJGerTq8D CoOnHWyymklr9ccIQiG1ZGo7Fkz+Gs5Wf5YrQUMEFB+IakB6QSsjANScPdrbKFZ0ULJ4 ajrlxcf3mIGl7h2pz3R0+IGjG63ikagDPJYDLzeqEeRySv5bMCcmUn0seeHtWBJ0uNgx +t+v4Oev9BPWh4onxiD4+tUvoHVBfgBf/hI5qJ/DCLkq2H/YGv9+H6zBmBMZuqwUUzeR Q7Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KdXwvS/yTomPQFCxtoNfk7JZBFMLuYBjmuQcPvxc06I=; fh=YCpWGDe4dlD/Msuo/KjbMNPS2Hvd2LSPoVlNK8Y+dew=; b=iuasassKix2chqZcsrbs09k0+qhbTxAzm4NJb0WMcPFcHotKxZx5xye7HNm9XleedR 1F8c8LV+BbNBtPuSEUnPZn27IkiPxDnFaXCo1FEfjbusHNrBzJYsMhBYULoHEijHFNWG s1Bb5aOkn9/JZWEvQXI8xle1MECopYc1PlXAOomZpOELM8ShlIXHgS7FZg2iK7b1vQV7 fqB02BCexmOTCUS/6R6piBJb7+MPIJ2dXSxRngs6esY60ZfCV90okxL6vdccM1/mkWSg dSNFv+f7tPh+fXkRj90g31xBd5dzLIlpfPWWFqvZ1VnGtpDcHlBv5PAwtZB/2nOzjkwm TDDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Of1NZNJS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id k1-20020a170902c40100b001cfc2da926bsi8801536plk.378.2023.12.04.12.34.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 12:34:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Of1NZNJS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id B0416804BDDB; Mon, 4 Dec 2023 12:34:00 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346139AbjLDUdr (ORCPT + 99 others); Mon, 4 Dec 2023 15:33:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235475AbjLDUde (ORCPT ); Mon, 4 Dec 2023 15:33:34 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95755183 for ; Mon, 4 Dec 2023 12:33:38 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 335BCC433C7; Mon, 4 Dec 2023 20:33:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701722018; bh=bffrGFa8sgnt1DTbLwM5YY9x7dbSrSlgtHaSRIwECUo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Of1NZNJSqpUYbt1eLx+oZSL/XWdAX9+/KtrLIEeJs4WfUA81/9RQW7/LVmVAyz69X Dq2OzukGsx2BDYsswaiH9WTMbdzvgQ0+6zLG0+uXK2GdN1VZVN0VSH5HinmZevezsk seWTh5dsqh4Z8P09gLzKIojlUr9kjGTsCIvCkSDEpinrn7kMj0+X7a6ugpLpEfXAJn Th64C4Lfn7tupMJMCN5c01NaYeozcSFFOTxovlZhPSy7a5tDA+PJQ/t6DHtRZhWYr8 FhXtD36/XHOcGQTMFAnpGKFUYEBhsBmlP7j8R19Q0Wm8yjClga/ryRrBiuBBwuxmz8 7duUD/qr8IX3A== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Namjae Jeon , Steve French , Sasha Levin , sfrench@samba.org, linux-cifs@vger.kernel.org Subject: [PATCH AUTOSEL 6.6 07/32] ksmbd: release interim response after sending status pending response Date: Mon, 4 Dec 2023 15:32:27 -0500 Message-ID: <20231204203317.2092321-7-sashal@kernel.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231204203317.2092321-1-sashal@kernel.org> References: <20231204203317.2092321-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.6.4 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 04 Dec 2023 12:34:00 -0800 (PST) From: Namjae Jeon [ Upstream commit 2a3f7857ec742e212d6cee7fbbf7b0e2ae7f5161 ] Add missing release async id and delete interim response entry after sending status pending response. This only cause when smb2 lease is enable. Signed-off-by: Namjae Jeon Signed-off-by: Steve French Signed-off-by: Sasha Levin --- fs/smb/server/ksmbd_work.c | 3 +++ fs/smb/server/oplock.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/smb/server/ksmbd_work.c b/fs/smb/server/ksmbd_work.c index 51def3ca74c01..42db5efa353f1 100644 --- a/fs/smb/server/ksmbd_work.c +++ b/fs/smb/server/ksmbd_work.c @@ -56,6 +56,9 @@ void ksmbd_free_work_struct(struct ksmbd_work *work) kfree(work->tr_buf); kvfree(work->request_buf); kfree(work->iov); + if (!list_empty(&work->interim_entry)) + list_del(&work->interim_entry); + if (work->async_id) ksmbd_release_id(&work->conn->async_ida, work->async_id); kmem_cache_free(work_cache, work); diff --git a/fs/smb/server/oplock.c b/fs/smb/server/oplock.c index 9bc0103720f57..50c68beb71d6c 100644 --- a/fs/smb/server/oplock.c +++ b/fs/smb/server/oplock.c @@ -833,7 +833,8 @@ static int smb2_lease_break_noti(struct oplock_info *opinfo) interim_entry); setup_async_work(in_work, NULL, NULL); smb2_send_interim_resp(in_work, STATUS_PENDING); - list_del(&in_work->interim_entry); + list_del_init(&in_work->interim_entry); + release_async_work(in_work); } INIT_WORK(&work->work, __smb2_lease_break_noti); ksmbd_queue_work(work); -- 2.42.0