* drivers/scsi/fnic/fnic_scsi.c:98:38: warning: array subscript -1 is outside array bounds of 'struct scsi_cmnd[23529010298098917]'
@ 2023-10-18 11:21 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-10-18 11:21 UTC (permalink / raw)
To: Karan Tilak Kumar
Cc: oe-kbuild-all, linux-kernel, Martin K. Petersen,
Sesidhar Baddela, Arulprabhu Ponnusamy
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 06dc10eae55b5ceabfef287a7e5f16ceea204aa0
commit: 514f0c400bde6b62405467daaf2a0a86bcf7794b scsi: fnic: Fix sg_reset success path
date: 3 weeks ago
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20231018/202310181947.fzMfU0gi-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231018/202310181947.fzMfU0gi-lkp@intel.com/reproduce)
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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310181947.fzMfU0gi-lkp@intel.com/
All warnings (new ones prefixed by >>):
In function 'fnic_io_lock_hash',
inlined from 'fnic_fcpio_itmf_cmpl_handler' at drivers/scsi/fnic/fnic_scsi.c:1086:13:
>> drivers/scsi/fnic/fnic_scsi.c:98:38: warning: array subscript -1 is outside array bounds of 'struct scsi_cmnd[23529010298098917]' [-Warray-bounds]
98 | u32 hash = scsi_cmd_to_rq(sc)->tag & (FNIC_IO_LOCKS - 1);
| ~~~~~~~~~~~~~~~~~~^~~~~
>> drivers/scsi/fnic/fnic_scsi.c:98:38: warning: array subscript -1 is outside array bounds of 'struct scsi_cmnd[23529010298098917]' [-Warray-bounds]
>> drivers/scsi/fnic/fnic_scsi.c:98:38: warning: array subscript -1 is outside array bounds of 'struct scsi_cmnd[23529010298098917]' [-Warray-bounds]
>> drivers/scsi/fnic/fnic_scsi.c:98:38: warning: array subscript -1 is outside array bounds of 'struct scsi_cmnd[23529010298098917]' [-Warray-bounds]
vim +98 drivers/scsi/fnic/fnic_scsi.c
5df6d737dd4b0f Abhijeet Joglekar 2009-04-17 94
5df6d737dd4b0f Abhijeet Joglekar 2009-04-17 95 static inline spinlock_t *fnic_io_lock_hash(struct fnic *fnic,
5df6d737dd4b0f Abhijeet Joglekar 2009-04-17 96 struct scsi_cmnd *sc)
5df6d737dd4b0f Abhijeet Joglekar 2009-04-17 97 {
e1c9f0cfac4f2e Bart Van Assche 2021-08-09 @98 u32 hash = scsi_cmd_to_rq(sc)->tag & (FNIC_IO_LOCKS - 1);
5df6d737dd4b0f Abhijeet Joglekar 2009-04-17 99
5df6d737dd4b0f Abhijeet Joglekar 2009-04-17 100 return &fnic->io_req_lock[hash];
5df6d737dd4b0f Abhijeet Joglekar 2009-04-17 101 }
5df6d737dd4b0f Abhijeet Joglekar 2009-04-17 102
:::::: The code at line 98 was first introduced by commit
:::::: e1c9f0cfac4f2ed2bc6e89f2f4061dcf1538d4cd scsi: fnic: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
:::::: TO: Bart Van Assche <bvanassche@acm.org>
:::::: CC: Martin K. Petersen <martin.petersen@oracle.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-10-18 11:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-18 11:21 drivers/scsi/fnic/fnic_scsi.c:98:38: warning: array subscript -1 is outside array bounds of 'struct scsi_cmnd[23529010298098917]' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®