From: Dan Carpenter <dan.carpenter@linaro.org>
To: "Zhijian Li (Fujitsu)" <lizhijian@fujitsu.com>
Cc: "dave@stgolabs.net" <dave@stgolabs.net>,
"jonathan.cameron@huawei.com" <jonathan.cameron@huawei.com>,
"dave.jiang@intel.com" <dave.jiang@intel.com>,
"alison.schofield@intel.com" <alison.schofield@intel.com>,
"vishal.l.verma@intel.com" <vishal.l.verma@intel.com>,
"ira.weiny@intel.com" <ira.weiny@intel.com>,
"dan.j.williams@intel.com" <dan.j.williams@intel.com>,
"linux-cxl@vger.kernel.org" <linux-cxl@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] cxl/region: Fix missing put_device(region_dev)
Date: Mon, 29 Apr 2024 13:32:56 +0300 [thread overview]
Message-ID: <856b5986-6f04-4aaa-ba35-fa5e6f3ebc2a@moroto.mountain> (raw)
In-Reply-To: <cd20f733-3523-490c-8bc1-73b7300f18b8@fujitsu.com>
Btw, I assume you're doing some kind of static analysis? Looking for
missing NULL checks is very tricky and I haven't found a way to do it
well except for looking at failed allocations. Allocations have to be
checked.
There are so many other functions where we leave off the NULL check
because the caller knows it can't fail.
regards,
dan carpenter
next prev parent reply other threads:[~2024-04-29 10:33 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-29 1:31 [PATCH 1/2] cxl/region: Fix potential invalid pointer dereference Li Zhijian
2024-04-29 1:31 ` [PATCH 2/2] cxl/region: Fix missing put_device(region_dev) Li Zhijian
2024-04-29 1:51 ` Zhijian Li (Fujitsu)
2024-04-29 8:00 ` Markus Elfring
2024-04-29 8:26 ` Zhijian Li (Fujitsu)
2024-04-29 10:00 ` Dan Carpenter
2024-04-29 10:11 ` Zhijian Li (Fujitsu)
2024-04-29 8:35 ` Zhijian Li (Fujitsu)
2024-04-29 10:17 ` Dan Carpenter
2024-04-29 10:26 ` Zhijian Li (Fujitsu)
2024-04-29 10:32 ` Dan Carpenter [this message]
2024-04-29 16:14 ` Ira Weiny
2024-04-29 7:50 ` [PATCH 1/2] cxl/region: Fix potential invalid pointer dereference Markus Elfring
2024-04-29 8:43 ` Zhijian Li (Fujitsu)
2024-04-29 8:55 ` [1/2] " Markus Elfring
2024-04-29 10:10 ` [PATCH 1/2] " Dan Carpenter
2024-04-29 10:25 ` Zhijian Li (Fujitsu)
2024-04-29 10:30 ` Dan Carpenter
2024-04-29 16:17 ` Ira Weiny
2024-04-29 16:05 ` Ira Weiny
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=856b5986-6f04-4aaa-ba35-fa5e6f3ebc2a@moroto.mountain \
--to=dan.carpenter@linaro.org \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=ira.weiny@intel.com \
--cc=jonathan.cameron@huawei.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizhijian@fujitsu.com \
--cc=vishal.l.verma@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