From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@01.org, "Jérôme Pouiller" <jerome.pouiller@silabs.com>
Cc: devel@driverdev.osuosl.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
kbuild-all@01.org
Subject: [staging:staging-testing 55/111] drivers/staging/wfx/wfx.h:91 wdev_to_wvif() warn: potential spectre issue 'wdev->vif' [r] (local cap)
Date: Wed, 9 Oct 2019 12:00:48 +0300 [thread overview]
Message-ID: <20191009090048.GA13286@kadam> (raw)
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
reply other threads:[~2019-10-09 9:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20191009090048.GA13286@kadam \
--to=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jerome.pouiller@silabs.com \
--cc=kbuild-all@01.org \
--cc=kbuild@01.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).