From: Dan Carpenter <dan.carpenter@oracle.com>
To: ilan.peer@intel.com
Cc: linux-wireless@vger.kernel.org
Subject: [bug report] iwlwifi: mvm: Explicitly stop session protection before unbinding
Date: Tue, 31 Aug 2021 10:43:06 +0300 [thread overview]
Message-ID: <20210831074305.GA11178@kili> (raw)
Hello Ilan Peer,
This is a semi-automatic email about new static checker warnings.
The patch 7b3954a1d69a: "iwlwifi: mvm: Explicitly stop session
protection before unbinding" from Jun 18, 2021, leads to the
following Smatch complaint:
drivers/net/wireless/intel/iwlwifi/mvm/time-event.c:668 __iwl_mvm_remove_time_event()
warn: variable dereferenced before check 'te_data->vif' (see line 665)
drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
664 u32 id;
665 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif);
^^^^^^^^^^^^
This is dereferenced inside the function.
666 enum nl80211_iftype iftype;
667
668 if (!te_data->vif)
^^^^^^^^^^^^^
The new patch adds a check for NULL, but I don't think it is required.
The kernel would have already crashed at this point at any rate so the
dereference needs to be moved.
669 return false;
670
671 iftype = te_data->vif->type;
672
673 /*
674 * It is possible that by the time we got to this point the time
675 * event was already removed.
regards,
dan carpenter
next reply other threads:[~2021-08-31 7:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-31 7:43 Dan Carpenter [this message]
2021-09-05 8:28 ` [bug report] iwlwifi: mvm: Explicitly stop session protection before unbinding Peer, Ilan
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=20210831074305.GA11178@kili \
--to=dan.carpenter@oracle.com \
--cc=ilan.peer@intel.com \
--cc=linux-wireless@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).