From: Paul Menzel <pmenzel@molgen.mpg.de>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next 2/6] ice: always check VF VSI pointer values
Date: Tue, 12 Apr 2022 07:38:43 +0200 [thread overview]
Message-ID: <e079ab74-48fc-65d1-4d3f-2c0cdd4ffcb9@molgen.mpg.de> (raw)
In-Reply-To: <20220411232907.1022602-3-jacob.e.keller@intel.com>
Dear Jacob,
Thank you for the patch.
Am 12.04.22 um 01:29 schrieb Jacob Keller:
> The ice_get_vf_vsi function can return NULL in some cases, such as if
> handling messages during a reset where the VSI is being removed and
> recreated.
>
> Several places throughout the driver do not bother to check whether this
> VSI pointer is valid. Static analysis tools maybe report issues because
> they detect paths where a potentially NULL pointer could be
> dereferenced.
(side note: scripts/checkpatch.pl checks for 75 characters per line, and
you seem to use 72 characters per line.)
> Fix this by checking the return value of ice_get_vf_vsi everywhere.
I didn?t understand, when WARN_ON() is necessary, and when not, but
looks fine.
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_devlink.c | 5 ++-
> drivers/net/ethernet/intel/ice/ice_repr.c | 7 +++-
> drivers/net/ethernet/intel/ice/ice_sriov.c | 32 +++++++++++++++++--
> drivers/net/ethernet/intel/ice/ice_vf_lib.c | 28 +++++++++++++++-
> drivers/net/ethernet/intel/ice/ice_virtchnl.c | 5 +++
> .../ethernet/intel/ice/ice_virtchnl_fdir.c | 7 +++-
> 6 files changed, 77 insertions(+), 7 deletions(-)
[?]
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Kind regards,
Paul
next prev parent reply other threads:[~2022-04-12 5:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-11 23:29 [Intel-wired-lan] [PATCH net-next 0/6] minor cleanups for ice virtualization Jacob Keller
2022-04-11 23:29 ` [Intel-wired-lan] [PATCH net-next 1/6] ice: add newline to dev_dbg in ice_vf_fdir_dump_info Jacob Keller
2022-04-12 5:10 ` Paul Menzel
2022-04-12 16:36 ` Keller, Jacob E
2022-04-11 23:29 ` [Intel-wired-lan] [PATCH net-next 2/6] ice: always check VF VSI pointer values Jacob Keller
2022-04-12 5:38 ` Paul Menzel [this message]
2022-04-12 17:35 ` Jacob Keller
2022-04-12 17:50 ` Paul Menzel
2022-04-18 22:58 ` Jacob Keller
2022-04-26 5:50 ` Jankowski, Konrad0
2022-04-11 23:29 ` [Intel-wired-lan] [PATCH net-next 3/6] ice: remove return value comment for ice_reset_all_vfs Jacob Keller
2022-04-11 23:29 ` [Intel-wired-lan] [PATCH net-next 4/6] ice: fix wording in comment for ice_reset_vf Jacob Keller
2022-04-11 23:29 ` [Intel-wired-lan] [PATCH net-next 5/6] ice: add a function comment for ice_cfg_mac_antispoof Jacob Keller
2022-04-11 23:29 ` [Intel-wired-lan] [PATCH net-next 6/6] ice: remove period on argument description in ice_for_each_vf Jacob Keller
2022-04-12 5:44 ` [Intel-wired-lan] [PATCH net-next 0/6] minor cleanups for ice virtualization Paul Menzel
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=e079ab74-48fc-65d1-4d3f-2c0cdd4ffcb9@molgen.mpg.de \
--to=pmenzel@molgen.mpg.de \
--cc=intel-wired-lan@osuosl.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