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 X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C6D9C433E2 for ; Tue, 8 Sep 2020 11:38:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CF43821532 for ; Tue, 8 Sep 2020 11:38:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="TUnKGV3A" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729422AbgIHLiU (ORCPT ); Tue, 8 Sep 2020 07:38:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729615AbgIHL17 (ORCPT ); Tue, 8 Sep 2020 07:27:59 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5708C061573 for ; Tue, 8 Sep 2020 04:27:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=7WZu8yEPToxwOxOhhBePKSmAHVZZ0k0hi3wlwa3S1c8=; b=TUnKGV3AHfrtbyC2uFQIrltWeY W5sw26FTblwDAB0xh/RXDkA0G7fQcuC2kFM/qiEKDdX5/arBNFFtiWhb194x1MgwJsj0gtoipXZhk X76nfSTZ+u6CYn/lJUwobmlEkqShS90Uu542t5wsScgKgvE9EPgLgEFlpCj8r+QVRkyROwSJ4O6VP j9fULbzUctK7pMPy/nIyi/vu5jtw2WrHTSWRVecE5Wgflca1asRRNnL62wtdIWCjjVqJX13uJYYO/ vH5RfWLa3Xwq5cgFnsMER51iYz6tIBUNyUjrbs2KDO80iiMNmvt3P4KTDVoIvjLD7y+706+rnvrXX MIsV++Yg==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFbmz-0000Yg-VF; Tue, 08 Sep 2020 11:27:54 +0000 Date: Tue, 8 Sep 2020 12:27:53 +0100 From: Matthew Wilcox To: Pradeep P V K Cc: miklos@szeredi.hu, linux-fsdevel@vger.kernel.org, stummala@codeaurora.org, sayalil@codeaurora.org, Pradeep P V K Subject: Re: [PATCH V4] fuse: Fix VM_BUG_ON_PAGE issue while accessing zero ref count page Message-ID: <20200908112753.GD27537@casper.infradead.org> References: <1599553026-11745-1-git-send-email-pragalla@qti.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1599553026-11745-1-git-send-email-pragalla@qti.qualcomm.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Tue, Sep 08, 2020 at 01:47:06PM +0530, Pradeep P V K wrote: > Changes since V3: > - Fix smatch warnings. > > Changes since V2: > - Moved the spin lock from fuse_copy_pages() to fuse_ref_page(). > > Changes since V1: > - Modified the logic as per kernel v5.9-rc1. > - Added Reported by tag. > > Reported-by: kernel test robot > Reported-by: Dan Carpenter Umm, the way this is written, it looks like Dan reported the original bug rather than a bug in v3. The usual way is to credit Dan in the 'Changes since' rather than putting in a 'Reported-by'. > static int fuse_ref_page(struct fuse_copy_state *cs, struct page *page, > - unsigned offset, unsigned count) > + unsigned offset, unsigned count, struct fuse_conn *fc) I'm no expert on fuse, but it looks to me like you should put a pointer to the fuse_conn in struct fuse_copy_state rather than passing it down through all these callers.