* drivers/net/wireless/mediatek/mt76/channel.c:307 mt76_put_vif_phy_link() warn: variable dereferenced before IS_ERR check 'mlink' (see line 305)
@ 2025-04-01 15:10 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2025-04-01 15:10 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Felix Fietkau <nbd@nbd.name>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 08733088b566b58283f0f12fb73f5db6a9a9de30
commit: 3ba20af886d1f604dceeb4d4c8ff872e2c4e885e wifi: mt76: scan: set vif offchannel link for scanning/roc
date: 13 days ago
:::::: branch date: 13 hours ago
:::::: commit date: 13 days ago
config: x86_64-randconfig-161-20250401 (https://download.01.org/0day-ci/archive/20250401/202504012337.kis2rdgS-lkp@intel.com/config)
compiler: clang version 20.1.1 (https://github.com/llvm/llvm-project 424c2d9b7e4de40d0804dd374721e6411c27d1d1)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202504012337.kis2rdgS-lkp@intel.com/
smatch warnings:
drivers/net/wireless/mediatek/mt76/channel.c:307 mt76_put_vif_phy_link() warn: variable dereferenced before IS_ERR check 'mlink' (see line 305)
vim +/mlink +307 drivers/net/wireless/mediatek/mt76/channel.c
e411b8190fe7c9 Felix Fietkau 2025-01-02 300
e411b8190fe7c9 Felix Fietkau 2025-01-02 301 void mt76_put_vif_phy_link(struct mt76_phy *phy, struct ieee80211_vif *vif,
e411b8190fe7c9 Felix Fietkau 2025-01-02 302 struct mt76_vif_link *mlink)
e411b8190fe7c9 Felix Fietkau 2025-01-02 303 {
e411b8190fe7c9 Felix Fietkau 2025-01-02 304 struct mt76_dev *dev = phy->dev;
3ba20af886d1f6 Felix Fietkau 2025-03-11 @305 struct mt76_vif_data *mvif = mlink->mvif;
e411b8190fe7c9 Felix Fietkau 2025-01-02 306
e411b8190fe7c9 Felix Fietkau 2025-01-02 @307 if (IS_ERR_OR_NULL(mlink) || !mlink->offchannel)
e411b8190fe7c9 Felix Fietkau 2025-01-02 308 return;
e411b8190fe7c9 Felix Fietkau 2025-01-02 309
3ba20af886d1f6 Felix Fietkau 2025-03-11 310 rcu_assign_pointer(mvif->offchannel_link, NULL);
e411b8190fe7c9 Felix Fietkau 2025-01-02 311 dev->drv->vif_link_remove(phy, vif, &vif->bss_conf, mlink);
e411b8190fe7c9 Felix Fietkau 2025-01-02 312 kfree(mlink);
e411b8190fe7c9 Felix Fietkau 2025-01-02 313 }
a8f424c1287cc7 Felix Fietkau 2025-01-02 314
:::::: The code at line 307 was first introduced by commit
:::::: e411b8190fe7c969c668eedb5b01f2865c89b1af wifi: mt76: add multi-radio support to scanning code
:::::: TO: Felix Fietkau <nbd@nbd.name>
:::::: CC: Felix Fietkau <nbd@nbd.name>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread* drivers/net/wireless/mediatek/mt76/channel.c:307 mt76_put_vif_phy_link() warn: variable dereferenced before IS_ERR check 'mlink' (see line 305)
@ 2025-04-01 10:04 Dan Carpenter
0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2025-04-01 10:04 UTC (permalink / raw)
To: oe-kbuild, Felix Fietkau; +Cc: lkp, oe-kbuild-all, linux-kernel
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 08733088b566b58283f0f12fb73f5db6a9a9de30
commit: 3ba20af886d1f604dceeb4d4c8ff872e2c4e885e wifi: mt76: scan: set vif offchannel link for scanning/roc
config: x86_64-randconfig-161-20250401 (https://download.01.org/0day-ci/archive/20250401/202504011739.HvUKtUUe-lkp@intel.com/config)
compiler: clang version 20.1.1 (https://github.com/llvm/llvm-project 424c2d9b7e4de40d0804dd374721e6411c27d1d1)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202504011739.HvUKtUUe-lkp@intel.com/
smatch warnings:
drivers/net/wireless/mediatek/mt76/channel.c:307 mt76_put_vif_phy_link() warn: variable dereferenced before IS_ERR check 'mlink' (see line 305)
vim +/mlink +307 drivers/net/wireless/mediatek/mt76/channel.c
e411b8190fe7c9 Felix Fietkau 2025-01-02 301 void mt76_put_vif_phy_link(struct mt76_phy *phy, struct ieee80211_vif *vif,
e411b8190fe7c9 Felix Fietkau 2025-01-02 302 struct mt76_vif_link *mlink)
e411b8190fe7c9 Felix Fietkau 2025-01-02 303 {
e411b8190fe7c9 Felix Fietkau 2025-01-02 304 struct mt76_dev *dev = phy->dev;
3ba20af886d1f6 Felix Fietkau 2025-03-11 @305 struct mt76_vif_data *mvif = mlink->mvif;
^^^^^^^^^^^
Dereference
e411b8190fe7c9 Felix Fietkau 2025-01-02 306
e411b8190fe7c9 Felix Fietkau 2025-01-02 @307 if (IS_ERR_OR_NULL(mlink) || !mlink->offchannel)
^^^^^
Too late
e411b8190fe7c9 Felix Fietkau 2025-01-02 308 return;
e411b8190fe7c9 Felix Fietkau 2025-01-02 309
3ba20af886d1f6 Felix Fietkau 2025-03-11 310 rcu_assign_pointer(mvif->offchannel_link, NULL);
e411b8190fe7c9 Felix Fietkau 2025-01-02 311 dev->drv->vif_link_remove(phy, vif, &vif->bss_conf, mlink);
e411b8190fe7c9 Felix Fietkau 2025-01-02 312 kfree(mlink);
e411b8190fe7c9 Felix Fietkau 2025-01-02 313 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread* drivers/net/wireless/mediatek/mt76/channel.c:307 mt76_put_vif_phy_link() warn: variable dereferenced before IS_ERR check 'mlink' (see line 305)
@ 2025-04-01 9:19 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2025-04-01 9:19 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Felix Fietkau <nbd@nbd.name>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 08733088b566b58283f0f12fb73f5db6a9a9de30
commit: 3ba20af886d1f604dceeb4d4c8ff872e2c4e885e wifi: mt76: scan: set vif offchannel link for scanning/roc
date: 13 days ago
:::::: branch date: 8 hours ago
:::::: commit date: 13 days ago
config: x86_64-randconfig-161-20250401 (https://download.01.org/0day-ci/archive/20250401/202504011739.HvUKtUUe-lkp@intel.com/config)
compiler: clang version 20.1.1 (https://github.com/llvm/llvm-project 424c2d9b7e4de40d0804dd374721e6411c27d1d1)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202504011739.HvUKtUUe-lkp@intel.com/
smatch warnings:
drivers/net/wireless/mediatek/mt76/channel.c:307 mt76_put_vif_phy_link() warn: variable dereferenced before IS_ERR check 'mlink' (see line 305)
vim +/mlink +307 drivers/net/wireless/mediatek/mt76/channel.c
e411b8190fe7c9 Felix Fietkau 2025-01-02 300
e411b8190fe7c9 Felix Fietkau 2025-01-02 301 void mt76_put_vif_phy_link(struct mt76_phy *phy, struct ieee80211_vif *vif,
e411b8190fe7c9 Felix Fietkau 2025-01-02 302 struct mt76_vif_link *mlink)
e411b8190fe7c9 Felix Fietkau 2025-01-02 303 {
e411b8190fe7c9 Felix Fietkau 2025-01-02 304 struct mt76_dev *dev = phy->dev;
3ba20af886d1f6 Felix Fietkau 2025-03-11 @305 struct mt76_vif_data *mvif = mlink->mvif;
e411b8190fe7c9 Felix Fietkau 2025-01-02 306
e411b8190fe7c9 Felix Fietkau 2025-01-02 @307 if (IS_ERR_OR_NULL(mlink) || !mlink->offchannel)
e411b8190fe7c9 Felix Fietkau 2025-01-02 308 return;
e411b8190fe7c9 Felix Fietkau 2025-01-02 309
3ba20af886d1f6 Felix Fietkau 2025-03-11 310 rcu_assign_pointer(mvif->offchannel_link, NULL);
e411b8190fe7c9 Felix Fietkau 2025-01-02 311 dev->drv->vif_link_remove(phy, vif, &vif->bss_conf, mlink);
e411b8190fe7c9 Felix Fietkau 2025-01-02 312 kfree(mlink);
e411b8190fe7c9 Felix Fietkau 2025-01-02 313 }
a8f424c1287cc7 Felix Fietkau 2025-01-02 314
:::::: The code at line 307 was first introduced by commit
:::::: e411b8190fe7c969c668eedb5b01f2865c89b1af wifi: mt76: add multi-radio support to scanning code
:::::: TO: Felix Fietkau <nbd@nbd.name>
:::::: CC: Felix Fietkau <nbd@nbd.name>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-04-01 15:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-01 15:10 drivers/net/wireless/mediatek/mt76/channel.c:307 mt76_put_vif_phy_link() warn: variable dereferenced before IS_ERR check 'mlink' (see line 305) kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2025-04-01 10:04 Dan Carpenter
2025-04-01 9:19 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.