]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-fc: rework the request initialization code
authorBart Van Assche <bvanassche@acm.org>
Mon, 8 Oct 2018 21:28:46 +0000 (14:28 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 17 Oct 2018 06:58:29 +0000 (08:58 +0200)
commit14404f3995e385231480fab283e167eee14306ff
tree4eeccf6e4311a005ff3123712d4c2d499b3720b5
parentec5f0235fbe626ffef4d5b290e4d4edbd735df26
nvme-fc: rework the request initialization code

Instead of setting and then clearing the first_sgl pointer for AEN requests,
leave that pointer zero. This patch does not change how requests are
initialized but avoids that Coverity reports the following complaint for
nvme_fc_init_aen_ops():

CID 1418400 (#1 of 1): Out-of-bounds access (OVERRUN)
4. overrun-buffer-val: Overrunning buffer pointed to by aen_op of 312 bytes by passing it to a function which accesses it at byte offset 312.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/fc.c