diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2024-12-04 15:06:41 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-12-05 18:45:09 -0800 |
commit | 11776cff0b563c8b8a4fa76cab620bfb633a8cb8 (patch) | |
tree | 35bac3ea6bac688d5849dda8eac88127e8b89c12 /net/unix/af_unix.c | |
parent | b04d86fff66b15c07505d226431f808c15b1703c (diff) |
net/mlx5: DR, prevent potential error pointer dereference
The dr_domain_add_vport_cap() function generally returns NULL on error
but sometimes we want it to return ERR_PTR(-EBUSY) so the caller can
retry. The problem here is that "ret" can be either -EBUSY or -ENOMEM
and if it's and -ENOMEM then the error pointer is propogated back and
eventually dereferenced in dr_ste_v0_build_src_gvmi_qpn_tag().
Fixes: 11a45def2e19 ("net/mlx5: DR, Add support for SF vports")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/07477254-e179-43e2-b1b3-3b9db4674195@stanley.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions