summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-04-22 12:36:41 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-29 16:31:23 +0200
commitb9d1ba5dd94009ae91aacf959801668b8ac9a2fe (patch)
treef3bf4e24d29d9a0aadf6c2884863d2e74a224246 /security
parentc39723ccc47d6454df44e1d1cf8af1d31abc2be4 (diff)
mlxsw: Fix some IS_ERR() vs NULL bugs
[ Upstream commit c391eb8366ae052d571bb2841f1ccb4d39f3ceb8 ] 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> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions