Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp289915pxv; Wed, 30 Jun 2021 05:51:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznMV/bqlyvzMX39DCdZ4FBSzMO3we7bLzX5MasRqEDbhpsnwJUwvItUwwv80/v3+95AhXY X-Received: by 2002:a02:c884:: with SMTP id m4mr697403jao.6.1625057518199; Wed, 30 Jun 2021 05:51:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625057518; cv=none; d=google.com; s=arc-20160816; b=YUNet2FrII6XhXBXGQpFRYNDgjlvyM9JRgO2owhK/+dXqyPiZmUUHU04l5nMuEioqH ZSxi5FcaO0/8+bf5oy2MAOE+F9Jj171/sp9k92WjfBiMdivy8+EGTifXPGOcyw6Xc6MW HS5CGbyOuf57s9nRuo4qrfZSks9yq7qMaQsY6vCrWx0LeXc6OoEYlS95RfLtXFxEgpe0 NGbrrvbxPf+bcsurzLMhUC/KNAWffFkJnfHa75O8gzV2NW4jyVWhf0m+TlTO5XBt94k9 vsGFgMYxd9hToSTScuHoPgvCDEs77ENkqLaIJnEI3sGRurJJGgRlq1onHHlKSS2c8pJ4 p02A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=2Z1Sr0ZZ3Eaq33xdrYwzRNUibLuxnwUA0miK9swTaYI=; b=d1XJwLCxerkKZaVAYrRekPPtDsWZzWegoZZsBPUxmpLTdH0iwLJiRWs499IoFIbyfQ 2vY9ZSZwH3ZIQnTDaklxAMV3zYA3+RX/ESQc+owkZT3KGwXpLZ1GnmyO7UFR6oSfYopp mG5jWJOGeLr8Xy+APA/z1JQCUhpEce7KZGm9Sj1vRgwJQaN3XuaerNcdJMTGzIAUSt4k vJJNTbmdVT9ybthI3pSYDIFo8O2TDmdh8IAb16j7+k4Kkp23myGtBmaBWsp1/ovFyfzA +XfABk2BCE1W7fCzUz9C4qLTKDnPX4Xgu8oWphlWXwOoAzo5MWpge125GrzMv+SN3xXy o0Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cJwlQR0P; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d12si12713301ils.58.2021.06.30.05.51.37; Wed, 30 Jun 2021 05:51:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cJwlQR0P; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234606AbhF3Mxx (ORCPT + 99 others); Wed, 30 Jun 2021 08:53:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234481AbhF3Mxx (ORCPT ); Wed, 30 Jun 2021 08:53:53 -0400 Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96E0AC061756; Wed, 30 Jun 2021 05:51:23 -0700 (PDT) Received: by mail-io1-xd34.google.com with SMTP id g22so3014999iom.1; Wed, 30 Jun 2021 05:51:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2Z1Sr0ZZ3Eaq33xdrYwzRNUibLuxnwUA0miK9swTaYI=; b=cJwlQR0PDO16mUnge992zKP+NwR6BBGtWFmFC9sJW7wkgtUHU9isQIg74HVWOqx2FA 1+oO596YYhUJRvGn/tvHFEah1egYALLUM6emh91+SiBZL4fk7JB1mmxCQ5WO4Or4posA gYuFpmZkm5kzlswRgM5CxOxVAXWXAWYHgXsrjQhzu60Ixp/NAbO0dLma9NXcjWjIZKmc 7l6CI12Y7yMA4igg/XxP6wqAxSVHsdAc7OQ58TxNF4UHA7JA5X61pYDUUJ2JDN+DCoYw yc9ofwvKGsN0LuKrbdrw4F1mdw5X+qor/GhoxLk5ZN5gMt1HiI/2JIsyooMJTBmVRGvY QxsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2Z1Sr0ZZ3Eaq33xdrYwzRNUibLuxnwUA0miK9swTaYI=; b=T/AiKUUT2fUfyKF/KoAX8J5TUlEX+RYiILJWHcIDx1JDCjr2W67BDt6zTWWHkrl0A4 sCtslvXn5xqt9182/l+LMkQmT7k9dwPopHD1yisE/u4Vn5SB7SW9mH7FpvQoIfKLHTOw 9lgLp/bCj/uVIKB49WrO9zy+RB2ajOP+ad7SE2mfKbXzSJAfxBsXpMyb7t/wdsq1178H zWIqo3wj2DC4VuSphRGWtztmAPkN6O/NiujN/Z4twxH0HwxAjCj+eJDXaFyRmbUv/GfT vpP55h7vvbduJ+vuvREY2TBgC4sBZuj7kKRTnPYA25pakhc93yMbaFbFYnGUlWnuN/xR PUwA== X-Gm-Message-State: AOAM532JSYoG9TYdXaRpUQozrk6JBVTKedPypiWAihV2aavmZ++icFz7 4ha5otzbrUvpvADPSDm8HSWrKnzyLtxJnH5/950= X-Received: by 2002:a02:9109:: with SMTP id a9mr8752667jag.93.1625057483032; Wed, 30 Jun 2021 05:51:23 -0700 (PDT) MIME-Version: 1.0 References: <20210629191035.681913-8-krisman@collabora.com> <202106300707.Xg0LaEwy-lkp@intel.com> <20210630084555.GH1983@kadam> <20210630104904.GS2040@kadam> In-Reply-To: <20210630104904.GS2040@kadam> From: Amir Goldstein Date: Wed, 30 Jun 2021 15:51:11 +0300 Message-ID: Subject: Re: [PATCH v3 07/15] fsnotify: pass arguments of fsnotify() in struct fsnotify_event_info To: Dan Carpenter Cc: kbuild@lists.01.org, Gabriel Krisman Bertazi , kbuild test robot , kbuild-all@lists.01.org, "Darrick J. Wong" , Theodore Tso , Dave Chinner , Jan Kara , David Howells , Khazhismel Kumykov , linux-fsdevel , Ext4 , kernel@collabora.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Jun 30, 2021 at 1:49 PM Dan Carpenter wrote: > > I think my bug report was not clear... :/ The code looks like this: > > sb = inode->i_sb; > > if (inode) ... > > The NULL check cannot be false because if "inode" is NULL we would have > already crashed when we dereference it on the line before. > > In this case, based on last years discussion, the "inode" pointer can't > be NULL. The debate is only whether the unnecessary NULL checks help > readability or hurt readability. > Right. Sorry, I forgot. Anyway, patch 11/15 of the same series changes this code to: sb = event_info->sb ?: inode->i_sb; So inode can and will be NULL coming from the caller of fsnotify_sb_error(sb, NULL). I think that should make smach happy? You can try to run it after patch 11/15 of this series. Thanks, Amir.