diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2023-09-06 17:16:09 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-09-07 21:19:42 +0300 |
commit | 1b36955cc048c8ff6ba448dbf4be0e52f59f2963 (patch) | |
tree | c0a05d117fe6a4743c521e62dd9ba6d1f6a2d8b9 /include/linux/olpc-ec.h | |
parent | 6afcf0fb92701487421aa73c692855aa70fbc796 (diff) | |
download | linux-1b36955cc048c8ff6ba448dbf4be0e52f59f2963.tar.xz |
net: enetc: distinguish error from valid pointers in enetc_fixup_clear_rss_rfs()
enetc_psi_create() returns an ERR_PTR() or a valid station interface
pointer, but checking for the non-NULL quality of the return code blurs
that difference away. So if enetc_psi_create() fails, we call
enetc_psi_destroy() when we shouldn't. This will likely result in
crashes, since enetc_psi_create() cleans up everything after itself when
it returns an ERR_PTR().
Fixes: f0168042a212 ("net: enetc: reimplement RFS/RSS memory clearing as PCI quirk")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/netdev/582183ef-e03b-402b-8e2d-6d9bb3c83bd9@moroto.mountain/
Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20230906141609.247579-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/olpc-ec.h')
0 files changed, 0 insertions, 0 deletions