From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "Cabiddu, Giovanni" <giovanni.cabiddu@intel.com>,
Li Zetao <lizetao1@huawei.com>,
davem@davemloft.net, lucas.segarra.fernandez@intel.com,
damian.muszynski@intel.com, qat-linux@intel.com,
linux-crypto@vger.kernel.org
Subject: Re: [PATCH -next] crypto: qat - remove redundant null pointer checks in adf_dbgfs_init()
Date: Sat, 14 Sep 2024 15:58:24 +0200 [thread overview]
Message-ID: <2024091453-champion-driveway-f9fe@gregkh> (raw)
In-Reply-To: <ZuV2L2WQXSEgcsy6@gondor.apana.org.au>
On Sat, Sep 14, 2024 at 07:40:31PM +0800, Herbert Xu wrote:
> On Sat, Sep 14, 2024 at 10:50:33AM +0200, Greg Kroah-Hartman wrote:
> >
> > > I think this is still buggy. That if statement should be removed
> > > as otherwise subsequent calls to debugfs_create_file will provide a
> > > NULL parent dentry instead of an error parent dentry. This causes
> > > debugfs to do things differently.
> >
> > debugfs, if something goes wrong, will return a real error, never NULL,
> > so any return value from a call can be passed back in.
>
> Right, that's why we should remove the if statement so that the
> error is saved and can then be passed back into the next debugfs
> call.
>
> With the error-checking if statement there, the error is discarded
> and the next debugfs call from this driver will simply get a NULL
> parent dentry.
Sorry, but yes, we are in agreement here, sorry, been reviewing a lot of
these "clean up" fixes that were wrong and got them confused.
thanks,
greg k-h
next prev parent reply other threads:[~2024-09-14 13:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 14:42 [PATCH -next] crypto: qat - remove redundant null pointer checks in adf_dbgfs_init() Li Zetao
2024-09-13 10:19 ` Herbert Xu
2024-09-13 14:52 ` Cabiddu, Giovanni
2024-09-14 8:40 ` Herbert Xu
2024-09-14 8:50 ` Greg Kroah-Hartman
2024-09-14 11:40 ` Herbert Xu
2024-09-14 13:58 ` Greg Kroah-Hartman [this message]
2024-09-16 9:42 ` [PATCH] crypto: qat - remove check after debugfs_create_dir() Cabiddu, Giovanni
2024-10-05 5:32 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2024091453-champion-driveway-f9fe@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=damian.muszynski@intel.com \
--cc=davem@davemloft.net \
--cc=giovanni.cabiddu@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=lizetao1@huawei.com \
--cc=lucas.segarra.fernandez@intel.com \
--cc=qat-linux@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox