From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Ilan Tayari <ilant-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [bug report] IB/mlx5: Respect mlx5_core reserved GIDs
Date: Thu, 6 Jul 2017 15:16:17 +0300 [thread overview]
Message-ID: <20170706121617.bpomxvwrljfjwl25@mwanda> (raw)
In-Reply-To: <20170706114733.GZ1528-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
On Thu, Jul 06, 2017 at 02:47:33PM +0300, Leon Romanovsky wrote:
>
> It works by chance, assuming that "->raw" will be always first member is
> not a good strategy, so I agree with Dan. It is NULL dereferencing.
>
How these false positives normally look is like this:
struct whatever *p = foo->bar;
if (!foo)
return -EINVAL;
It looks like a dereference but isn't. And in this case it doesn't
matter if it's the first member or not.
Anyway, just from a correctness point of view it's better to not print
false positives.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-07-06 12:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-06 9:39 [bug report] IB/mlx5: Respect mlx5_core reserved GIDs Dan Carpenter
2017-07-06 10:38 ` Leon Romanovsky
[not found] ` <20170706103811.GY1528-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-07-06 11:10 ` Dan Carpenter
2017-07-06 11:24 ` Ilan Tayari
[not found] ` <AM4PR0501MB194030AAB6D5D15585C416AADBD50-dp/nxUn679gfNUYDR5dMTsDSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-07-06 11:44 ` Dan Carpenter
2017-07-06 12:04 ` Leon Romanovsky
[not found] ` <20170706120407.GA1528-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-07-06 12:09 ` Ilan Tayari
2017-07-06 11:47 ` Leon Romanovsky
[not found] ` <20170706114733.GZ1528-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-07-06 12:16 ` Dan Carpenter [this message]
2017-07-17 9:19 ` Ilan Tayari
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=20170706121617.bpomxvwrljfjwl25@mwanda \
--to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=ilant-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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