Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3487643pxp; Mon, 14 Mar 2022 22:13:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzz6IBGqDu6OPniVNVcXkyk8AWOWc3pjsJId9iwyibgJgPfdEnFQGwYOcQSVvVsdhm09EH3 X-Received: by 2002:a17:907:d01:b0:6d7:9f7f:ef8a with SMTP id gn1-20020a1709070d0100b006d79f7fef8amr21792892ejc.656.1647321212958; Mon, 14 Mar 2022 22:13:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647321212; cv=none; d=google.com; s=arc-20160816; b=W3vMdQzbHq/CJ41gqmpwRSvu1SxiFvCEKT3u+cdQCkxDukmYhsOrwo8/nhJFZHui1x kiNK+IcceEayfv2kwBn33rDTfa2sCIFu86U9TbJANU0ceHn78BQGkJvl7R8KwQ6F/M+g whBKeM99hdg6JBPmJB6loAlmiAZtFtfcakc1gubRDiHSUdE9uTZO8j8G+PTMvEj09/Gf Cu8k4waHzlNtNNukP20aD2jUzhwUKHCxxYI+GwrQY9MPPjuqwJ1pd1VKfXadnGw4ILtS HzxKwI1F5Tj5UobWmpl/V0rt5SDiD+r817MhAdqAkfkKUmprnGbm5m4pv4avpxQizhM1 W5WQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=OyN/BW1ktRn7HNEdnIa+Zp/rFW1EoPkAJ2UdTSdjqRk=; b=Jio6DhcdXeUu+JCeNN/j8SlYyWeeV8jojQlEAoGnFXKZppbQmzVHn4nYPY5zgEL5XF AvTmlmh3M060xS6oawNjKi5Bnr3Ge6mGuzvYTzwaMr7hVQVApA+TcEw8J/L2sOJ2olvd nRDFZOKuyDVj6JTmTtWVWgfe7EAU5stcUICGYHSUfDBQ0K2RzHQYldckfV17VSCCeB2V dGQbJ64amGWlZR+1cpoA9G5QcVkybC9zuN+DdfQ++bnNFwRmHRNsCDbz9Kj/MifXByh1 oVgHIKKRvyMHy9CozFtpSjvJYTkB/L9HmK+nHOJ2BwjfLQjZkBBNgB/lQOzUIjsZaLSL 0nDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=l35zoC+G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e20-20020aa7d7d4000000b00415f18b8e50si10766847eds.123.2022.03.14.22.13.08; Mon, 14 Mar 2022 22:13:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=l35zoC+G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244934AbiCNMce (ORCPT + 99 others); Mon, 14 Mar 2022 08:32:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243933AbiCNMVY (ORCPT ); Mon, 14 Mar 2022 08:21:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 249D813CF7; Mon, 14 Mar 2022 05:18:43 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 9EA7E608C4; Mon, 14 Mar 2022 12:18:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 820D4C340E9; Mon, 14 Mar 2022 12:18:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647260322; bh=AUqtvabMwOT8H1tChuw/4DbeorIaoD6A+b5KC2+sjwI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l35zoC+GVveTbTDAYsb+joju3ZKB9mXu5XdkTt0SjmVIMJ9iJN5nMpcSeJexxkVCX 89tVo3ODpFNXBf0n4NHqavaGQi0120uvKbxnYY2lotEvhJhwlXRCtdt28vRhXuR31k qXZ8wZ3tAFuFJtQuuRlWadPO6rPASWOXYcPyOhCM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jann Horn , David Howells , Linus Torvalds Subject: [PATCH 5.16 107/121] watch_queue: Fix to release page in ->release() Date: Mon, 14 Mar 2022 12:54:50 +0100 Message-Id: <20220314112747.097751086@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220314112744.120491875@linuxfoundation.org> References: <20220314112744.120491875@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: David Howells commit c1853fbadcba1497f4907971e7107888e0714c81 upstream. When a pipe ring descriptor points to a notification message, the refcount on the backing page is incremented by the generic get function, but the release function, which marks the bitmap, doesn't drop the page ref. Fix this by calling generic_pipe_buf_release() at the end of watch_queue_pipe_buf_release(). Fixes: c73be61cede5 ("pipe: Add general notification queue support") Reported-by: Jann Horn Signed-off-by: David Howells Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- kernel/watch_queue.c | 1 + 1 file changed, 1 insertion(+) --- a/kernel/watch_queue.c +++ b/kernel/watch_queue.c @@ -54,6 +54,7 @@ static void watch_queue_pipe_buf_release bit += page->index; set_bit(bit, wqueue->notes_bitmap); + generic_pipe_buf_release(pipe, buf); } // No try_steal function => no stealing