* [staging:staging-testing 55/111] drivers/staging/wfx/wfx.h:91 wdev_to_wvif() warn: potential spectre issue 'wdev->vif' [r] (local cap)
@ 2019-10-09 9:00 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2019-10-09 9:00 UTC (permalink / raw)
To: kbuild, Jérôme Pouiller; +Cc: devel, Greg Kroah-Hartman, kbuild-all
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@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
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@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-10-09 9:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-09 9:00 [staging:staging-testing 55/111] drivers/staging/wfx/wfx.h:91 wdev_to_wvif() warn: potential spectre issue 'wdev->vif' [r] (local cap) Dan Carpenter
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).