[staging:staging-testing 55/111] drivers/staging/wfx/wfx.h:91 wdev_to_wvif() warn: potential spectre issue 'wdev->vif' [r] (local cap)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
head:   d49d1c76b96ebf39539e93d5ab7943a01ef70e4f
commit: 9bca45f3d6924f19f29c0d019e961af3f41bdc9e [55/111] staging: wfx: allow to send 802.11 frames

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>
Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

New smatch warnings:
drivers/staging/wfx/wfx.h:91 wdev_to_wvif() warn: potential spectre issue 'wdev->vif' [r] (local cap)
drivers/staging/wfx/data_tx.c:479 wfx_tx_get_raw_link_id() warn: signedness bug returning '(-2)'

# https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/commit/?id=9bca45f3d6924f19f29c0d019e961af3f41bdc9e
git remote add staging https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
git remote update staging
git checkout 9bca45f3d6924f19f29c0d019e961af3f41bdc9e
vim +91 drivers/staging/wfx/wfx.h

e16e7f0716a6ba Jérôme Pouiller 2019-09-19  80  
f4a71ba8753d94 Jérôme Pouiller 2019-09-19  81  static inline struct wfx_vif *wdev_to_wvif(struct wfx_dev *wdev, int vif_id)
f4a71ba8753d94 Jérôme Pouiller 2019-09-19  82  {
f4a71ba8753d94 Jérôme Pouiller 2019-09-19  83  	if (vif_id >= ARRAY_SIZE(wdev->vif)) {
f4a71ba8753d94 Jérôme Pouiller 2019-09-19  84  		dev_dbg(wdev->dev, "requesting non-existent vif: %d\n", vif_id);
f4a71ba8753d94 Jérôme Pouiller 2019-09-19  85  		return NULL;
f4a71ba8753d94 Jérôme Pouiller 2019-09-19  86  	}

		vaf_id = array_index_nospec(wdev->vif, ARRAY_SIZE(wdev->vif)); ?

f4a71ba8753d94 Jérôme Pouiller 2019-09-19  87  	if (!wdev->vif[vif_id]) {
f4a71ba8753d94 Jérôme Pouiller 2019-09-19  88  		dev_dbg(wdev->dev, "requesting non-allocated vif: %d\n", vif_id);
f4a71ba8753d94 Jérôme Pouiller 2019-09-19  89  		return NULL;
f4a71ba8753d94 Jérôme Pouiller 2019-09-19  90  	}
f4a71ba8753d94 Jérôme Pouiller 2019-09-19 @91  	return (struct wfx_vif *) wdev->vif[vif_id]->drv_priv;
f4a71ba8753d94 Jérôme Pouiller 2019-09-19  92  }

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux