From: Ido Schimmel <idosch@idosch.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jiri Pirko <jiri@mellanox.com>,
Ido Schimmel <idosch@mellanox.com>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH net] mlxsw: Fix some IS_ERR() vs NULL bugs
Date: Thu, 23 Apr 2020 11:06:27 +0300 [thread overview]
Message-ID: <20200423080627.GA3616668@splinter> (raw)
In-Reply-To: <20200422093641.GA189235@mwanda>
On Wed, Apr 22, 2020 at 12:36:41PM +0300, Dan Carpenter wrote:
> The mlxsw_sp_acl_rulei_create() function is supposed to return an error
> pointer from mlxsw_afa_block_create(). The problem is that these
> functions both return NULL instead of error pointers. Half the callers
> expect NULL and half expect error pointers so it could lead to a NULL
> dereference on failure.
>
> This patch changes both of them to return error pointers and changes all
> the callers which checked for NULL to check for IS_ERR() instead.
>
> Fixes: 4cda7d8d7098 ("mlxsw: core: Introduce flexible actions support")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Thanks, Dan.
next prev parent reply other threads:[~2020-04-23 8:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-22 9:36 [PATCH net] mlxsw: Fix some IS_ERR() vs NULL bugs Dan Carpenter
2020-04-23 8:06 ` Ido Schimmel [this message]
2020-04-23 19:34 ` David Miller
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=20200423080627.GA3616668@splinter \
--to=idosch@idosch.org \
--cc=dan.carpenter@oracle.com \
--cc=davem@davemloft.net \
--cc=idosch@mellanox.com \
--cc=jiri@mellanox.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).