[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAErSpo4-Kd2WTQHO01Syce4oj_w+Oui6kMcucLZNsWi-v8u4WA@mail.gmail.com>
Date: Tue, 2 Dec 2014 16:41:08 -0700
From: Bjorn Helgaas <bhelgaas@...gle.com>
To: Huacai Chen <chenhc@...ote.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@...com>,
"David S. Miller" <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Vince Bridgers <vbridgers2013@...il.com>
Subject: Re: stmmac: platform: fix default values of the filter bins setting
Looks like 571dcfde2371 ("stmmac: platform: fix default values of the
filter bins setting") introduced the following error. Either
1) "plat_dat" can never be NULL, and the test and associated code
should be removed, or
2) "plat_dat" may be NULL, and we may now dereference it and cause an oops.
---------- Forwarded message ----------
From: <scan-admin@...erity.com>
Date: Tue, Dec 2, 2014 at 4:16 PM
Subject: New Defects reported by Coverity Scan for Linux
To: bhelgaas@...gle.com
Hi,
Please find the latest report on new defect(s) introduced to Linux
found with Coverity Scan.
1 new defect(s) introduced to Linux found with Coverity Scan.
5 defect(s), reported by Coverity Scan earlier, were marked fixed in
the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)
** CID 1256529: Dereference before null check (REVERSE_INULL)
/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c: 275 in
stmmac_pltfr_probe()
________________________________________________________________________________________________________
*** CID 1256529: Dereference before null check (REVERSE_INULL)
/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c: 275 in
stmmac_pltfr_probe()
269 plat_dat->multicast_filter_bins = HASH_TABLE_SIZE;
270
271 /* Set default value for unicast filter entries */
272 plat_dat->unicast_filter_entries = 1;
273
274 if (pdev->dev.of_node) {
>>> CID 1256529: Dereference before null check (REVERSE_INULL)
>>> Null-checking "plat_dat" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
275 if (!plat_dat)
276 plat_dat = devm_kzalloc(&pdev->dev,
277 sizeof(struct
plat_stmmacenet_data),
278 GFP_KERNEL);
279 if (!plat_dat) {
280 pr_err("%s: ERROR: no memory", __func__);
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit,
http://scan.coverity.com/projects/128?tab=overview
To unsubscribe from the email notification for new defects,
http://scan5.coverity.com/cgi-bin/unsubscribe.py
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists