Commit eaa7ce6
wifi: mac80211_hwsim: Fix possible NULL dereference
The 'vif' pointer in the Tx information might be NULL, e.g., in
case of injected frames etc. and is not checked in all paths. Fix it.
While at it, also directly use the local 'vif' pointer.
Fixes: a37a6f5 ("wifi: mac80211_hwsim: Add simulation support for NAN device")
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/linux-wireless/aNJUlyIiSTW9zZdr@stanley.mountain
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20251110140128.ec00ae795a32.I9c65659b52434189d8b2ba06710d482669a3887a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>1 parent 7fe0d21 commit eaa7ce6
1 file changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2003 | 2003 | | |
2004 | 2004 | | |
2005 | 2005 | | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
2006 | 2012 | | |
2007 | | - | |
| 2013 | + | |
2008 | 2014 | | |
2009 | 2015 | | |
2010 | 2016 | | |
| |||
2065 | 2071 | | |
2066 | 2072 | | |
2067 | 2073 | | |
2068 | | - | |
2069 | | - | |
| 2074 | + | |
| 2075 | + | |
2070 | 2076 | | |
2071 | 2077 | | |
2072 | 2078 | | |
2073 | 2079 | | |
2074 | | - | |
| 2080 | + | |
2075 | 2081 | | |
2076 | 2082 | | |
2077 | 2083 | | |
| |||
0 commit comments