From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63EC04137B6 for ; Mon, 27 Jul 2026 13:08:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785157737; cv=none; b=MU/FOOSdTF9PUCzHB8LpnO40Fg6DnqaUtv9TYI8t6ytFSGyYxkn75Eqs6xgkc/RBdqQVMJ5Hdw/eREesCdo3el0j0tFwLfatxiiJdcceJVrC0w+ulEuYl+7LdAZUZOzx7zg1L1rvhnKQn8CEgGNVi9vTU+fAeek0RKa3G2M7mA0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785157737; c=relaxed/simple; bh=NhQmeJ7xXtC2qhhuZdlM1pf4BctUAxpJW0Z9jOz1lXw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dCwhdP093RZVGIeQXmvl67nIQTZxa747GCc5DVYZLCOKQrzugGp1EhtOqoCCK+C4Fj4zb1lGA7OjQ4vleP4MyVwPEAyLIyWd3xR1iC1HPLHXGe4pNIatc1pLNAgWCWccyxaLFbChql0dtbRtpabF28Gf0OVqBZ6vqaUKdC/LzRY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=KA2fFp2G; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KA2fFp2G" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1785157735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NQ4xYgPisX1eloJMBrUIHWw1g1geoI0YKTxulh3uSC0=; b=KA2fFp2GTf30u7iHRj+UxOEK9GDacg3xOkejphdl36jz/8dLzNeg0N0kgBDgB3Wd3AUED/ N7Ohqy3sxe4OQhN3C238ZFW7mwLw0xC0GUMcXwNn+mExno48pk77qB+GMpDkT2aEH48uef Vszvx71WXPIrsms7Nk3fR+twfByLzIA= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-611-UFhTuMwfPZmS-4eM301VAw-1; Mon, 27 Jul 2026 09:08:50 -0400 X-MC-Unique: UFhTuMwfPZmS-4eM301VAw-1 X-Mimecast-MFC-AGG-ID: UFhTuMwfPZmS-4eM301VAw_1785157728 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B86241955DC3; Mon, 27 Jul 2026 13:08:48 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.44.33.159]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 92F7A1955F17; Mon, 27 Jul 2026 13:08:46 +0000 (UTC) From: David Howells To: Christian Brauner Cc: David Howells , Marc Dionne , linux-afs@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH 4/8] afs: Fix missing kunmap in afs_dir_search_bucket() Date: Mon, 27 Jul 2026 14:08:20 +0100 Message-ID: <20260727130827.1100080-5-dhowells@redhat.com> In-Reply-To: <20260727130827.1100080-1-dhowells@redhat.com> References: <20260727130827.1100080-1-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 Fix afs_dir_search_bucket() to kunmap the block it's using in the "bad:" path. Fixes: a5b5beebcf96 ("afs: Use the contained hashtable to search a directory") Closes: https://sashiko.dev/#/patchset/20260716103030.3065561-1-dhowells%40redhat.com Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-fsdevel@vger.kernel.org cc: stable@vger.kernel.org --- fs/afs/dir_search.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/afs/dir_search.c b/fs/afs/dir_search.c index 104411c0692f..4977ad81fa82 100644 --- a/fs/afs/dir_search.c +++ b/fs/afs/dir_search.c @@ -173,12 +173,11 @@ int afs_dir_search_bucket(struct afs_dir_iter *iter, const struct qstr *name, ret = -ENOENT; found: +bad: if (iter->block) { kunmap_local(iter->block); iter->block = NULL; } - -bad: if (ret == -ESTALE) afs_invalidate_dir(iter->dvnode, afs_dir_invalid_iter_stale); _leave(" = %d", ret);