summaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
authorGaosheng Cui <cuigaosheng1@huawei.com>2022-11-17 11:51:00 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2022-11-26 00:30:05 +0000
commite118df492320176af94deec000ae034cc92be754 (patch)
tree88eac71ee5ee948b25f0257fd2fc4b9f94bcc5f6 /usr
parent95da5e58172cd3c58b82cb01e6cd157b6c5eabe9 (diff)
downloadkernel-e118df492320176af94deec000ae034cc92be754.tar.gz
scsi: snic: Fix possible UAF in snic_tgt_create()
Smatch reports a warning as follows: drivers/scsi/snic/snic_disc.c:307 snic_tgt_create() warn: '&tgt->list' not removed from list If device_add() fails in snic_tgt_create(), tgt will be freed, but tgt->list will not be removed from snic->disc.tgt_list, then list traversal may cause UAF. Remove from snic->disc.tgt_list before free(). Fixes: c8806b6c9e82 ("snic: driver for Cisco SCSI HBA") Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com> Link: https://lore.kernel.org/r/20221117035100.2944812-1-cuigaosheng1@huawei.com Acked-by: Narsimhulu Musini <nmusini@cisco.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'usr')
0 files changed, 0 insertions, 0 deletions
clude headersH Hartley Sweeten comedidev.h is the main kernel header for comedi. Every comedi driver includes this header which then includes a number of <linux/*> headers. All the drivers need <linux/module.h> and some of them need <linux/delay.h>. The rest are not needed by any of the drivers. Remove all the includes in comedidev.h except for <linux/dma-mapping.h>, which is needed to pick up the enum dma_data_direction for the comedi_subdevice definition, and "comedi.h", which is the uapi header for comedi. Add <linux/module.h> to all the comedi drivers and <linux/delay.h> to the couple that need it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2013-05-13staging: comedi: remove FSF address from boilerplate textH Hartley Sweeten Addresses change... Remove the paragraph with the FSF address from all the comedi source files. Also, remove the paragraph about the finding the complete GPL in the COPYING file since it's unnecessary. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>