From nobody Sat Apr 11 17:07:14 2026 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 5F388C19F2D for ; Tue, 9 Aug 2022 20:31:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245680AbiHIUba (ORCPT ); Tue, 9 Aug 2022 16:31:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245467AbiHIUbS (ORCPT ); Tue, 9 Aug 2022 16:31:18 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD7F3A47B; Tue, 9 Aug 2022 13:31:16 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id r1-20020a05600c35c100b003a326685e7cso953706wmq.1; Tue, 09 Aug 2022 13:31:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=C6jMsEHD+9BE7cLO107IUMZV7EzYBxJicgZ/uXZruiM=; b=XgDuAtfv8nBWmTgVXog7nsDRSVeu7p7fp3NgRdOFPutP8eWHd1OuydtngJTqqMaMRr aAyxF7uNGyLwI3Buymg8FKY0fPYc+X4bkq3P99yya2s/2E7uaebfIH6VuiSpRRkmqOWN +bHMxQFoBokh8og4st/uG2AfIXmEv2BPyMF0ahvPaO+fcuULgUgsL5QsUAg3P+fvjarb VFdzhUahrE7LtVKnRAHo/jz24wjsNsEVqxdY5aOjfHhIAaaVud5bvGhOal0FlCB9DA4T WbP14fdYcb2gXq2+KLGbp/q9anwSYAGC4fq90GYq6t50/X7JjjDbm81IeAugOWi6gajs XqKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=C6jMsEHD+9BE7cLO107IUMZV7EzYBxJicgZ/uXZruiM=; b=UcDSx58KU62OcVkK90u0LuIKUi7OvhA3Ay5xczXnvN4M7OTTAD0QDLHdObZDsKk+Xg INYO7pOUA3qNUcOUlVvWwAcEApHkG+JH5Agp7b+wFFDEmr9NzRg9oHYvia6s9cHDLZCu x56Rxm75VliBf9PKbwo4RGO/TUVTJEvTStZX6TfL9/xmXAHkQi2mqo8RTQRhf9wE2SVc PEDDBVPFC7rUO/VyrOhq25V3lDKEWgV3KdRkhwIaGtAk2qAhl42ftbk3U8eqM3VTa0MU JxmRGEKTmw7p0EYcNXjsV9TP5DKpIFVFL5N/0F1RSqTV55knlCbUzAdXx9KGLVTgehOF qDDg== X-Gm-Message-State: ACgBeo12GBYbT9nu4nf18tu0LtAM/vYYx8wFo8VD6GFwF8XOQfokgzPd 7gIieEGdHHPeh+9suTjyaVE= X-Google-Smtp-Source: AA6agR4j76MuyV0kEK/jsRIquQ+3LfBPUcjWL3AXkbc3CFMbxHrY2VGM0+iVNFypopBYZxB01BO0RQ== X-Received: by 2002:a05:600c:501e:b0:3a3:4a04:fdb5 with SMTP id n30-20020a05600c501e00b003a34a04fdb5mr133630wmr.168.1660077075174; Tue, 09 Aug 2022 13:31:15 -0700 (PDT) Received: from localhost.localdomain (host-79-27-108-198.retail.telecomitalia.it. [79.27.108.198]) by smtp.gmail.com with ESMTPSA id ck15-20020a5d5e8f000000b002205f0890eesm15085263wrb.77.2022.08.09.13.31.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Aug 2022 13:31:13 -0700 (PDT) From: "Fabio M. De Francesco" To: "Matthew Wilcox (Oracle)" , "Fabio M. De Francesco" , Ira Weiny , Jens Axboe , Andrew Morton , Bart Van Assche , Kees Cook , Muchun Song , Viacheslav Dubeyko , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] hfsplus: Unmap the page in the "fail_page" label Date: Tue, 9 Aug 2022 22:31:02 +0200 Message-Id: <20220809203105.26183-2-fmdefrancesco@gmail.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220809203105.26183-1-fmdefrancesco@gmail.com> References: <20220809203105.26183-1-fmdefrancesco@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Several paths within hfs_btree_open() jump to the "fail_page" label where put_page() is called while the page is still mapped. Call kunmap() to unmap the page soon before put_page(). Cc: Viacheslav Dubeyko Reviewed-by: Ira Weiny Signed-off-by: Fabio M. De Francesco Reviewed-by: Viacheslav Dubeyko --- fs/hfsplus/btree.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c index 66774f4cb4fd..3a917a9a4edd 100644 --- a/fs/hfsplus/btree.c +++ b/fs/hfsplus/btree.c @@ -245,6 +245,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb= , u32 id) return tree; =20 fail_page: + kunmap(page); put_page(page); free_inode: tree->inode->i_mapping->a_ops =3D &hfsplus_aops; --=20 2.37.1