Wenwen Wang
6b995f4eec
misc: mic: fix a DMA pool free failure
...
In _scif_prog_signal(), the boolean variable 'x100' is used to indicate
whether the MIC Coprocessor is X100. If 'x100' is true, the status
descriptor will be used to write the value to the destination. Otherwise, a
DMA pool will be allocated for this purpose. Specifically, if the DMA pool
is allocated successfully, two memory addresses will be returned. One is
for the CPU and the other is for the device to access the DMA pool. The
former is stored to the variable 'status' and the latter is stored to the
variable 'src'. After the allocation, the address in 'src' is saved to
'status->src_dma_addr', which is actually in the DMA pool, and 'src' is
then modified.
Later on, if an error occurs, the execution flow will transfer to the label
'dma_fail', which will check 'x100' and free up the allocated DMA pool if
'x100' is false. The point here is that 'status->src_dma_addr' is used for
freeing up the DMA pool. As mentioned before, 'status->src_dma_addr' is in
the DMA pool. And thus, the device is able to modify this data. This can
potentially cause failures when freeing up the DMA pool because of the
modified device address.
This patch avoids the above issue by using the variable 'src' (with
necessary calculation) to free up the DMA pool.
Signed-off-by: Wenwen Wang <wang6495@umn.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-15 20:47:40 +02:00
..
altera-stapl
treewide: kzalloc() -> kcalloc()
2018-06-12 16:19:22 -07:00
c2port
kmemcheck: remove annotations
2017-11-15 18:21:04 -08:00
cardreader
misc: rtsx: make several functions static
2018-07-03 13:01:48 +02:00
cb710
cb710: Convert to new IDA API
2018-08-21 23:54:18 -04:00
cxl
misc: cxl: Fix possible null pointer dereference
2018-10-11 12:15:03 +02:00
echo
misc: echo: Remove unnecessary parentheses and simplify check for zero
2018-09-25 20:21:02 +02:00
eeprom
eeprom: at25: use devm_nvmem_register()
2018-09-28 15:14:53 +02:00
genwqe
misc: card_utils: remove duplicated include file
2018-10-02 15:57:22 -07:00
ibmasm
ibmasm: don't write out of bounds in read handler
2018-07-07 09:59:35 +02:00
lis3lv02d
vfs: do bulk POLL* -> EPOLL* replacement
2018-02-11 14:34:03 -08:00
lkdtm
misc: lkdtm: fixed static variable initialization
2018-09-12 09:46:46 +02:00
mei
mei: replace POLL* with EPOLL* for write queues.
2018-10-02 15:39:59 -07:00
mic
misc: mic: fix a DMA pool free failure
2018-10-15 20:47:40 +02:00
ocxl
Merge branch 'akpm' (patches from Andrew)
2018-08-17 16:49:31 -07:00
sgi-gru
misc: sgi-gru: fix fall-through annotations
2018-09-20 15:13:52 +02:00
sgi-xp
misc: sgi-xp: remove meaningless null check before kfree
2018-09-14 15:36:20 +02:00
ti-st
misc: ti-st: Fix memory leak in the error path of probe()
2018-08-02 10:35:04 +02:00
vmw_vmci
VMCI: remove set but not used variable 'cid'
2018-10-02 16:02:14 -07:00
ad525x_dpot-i2c.c
drivers: misc: ad525x_dpot: Update MODULE AUTHOR email address
2018-09-14 15:36:20 +02:00
ad525x_dpot-spi.c
drivers: misc: ad525x_dpot: Update MODULE AUTHOR email address
2018-09-14 15:36:20 +02:00
ad525x_dpot.c
drivers: misc: ad525x_dpot: Update MODULE AUTHOR email address
2018-09-14 15:36:20 +02:00
ad525x_dpot.h
misc: ad525x_dpot: Unnecessary space before function pointer arguments
2017-12-18 15:59:17 +01:00
apds990x.c
misc: apds990x: remove unused array ir_currents
2018-09-12 09:46:46 +02:00
apds9802als.c
aspeed-lpc-ctrl.c
misc: aspeed-lpc-ctrl: Enable FWH and A2H bridge cycles
2018-03-15 18:20:51 +01:00
aspeed-lpc-snoop.c
drivers/misc: Aspeed LPC snoop output using misc chardev
2018-07-16 13:30:47 +02:00
atmel-ssc.c
atmel_tclib.c
bh1770glc.c
misc: bh1770glc: remove unused array prox_curr_ma
2018-09-12 09:46:46 +02:00
cs5535-mfgpt.c
ds1682.c
misc: ds1682: Ignore update-in-progress ETC reads
2018-01-09 17:03:57 +01:00
dummy-irq.c
enclosure.c
misc: enclosure: Remove unnecessary error check
2017-12-07 18:45:31 +01:00
fsa9480.c
misc: fsa9480: Add blank line after declarations.
2018-01-09 17:03:57 +01:00
hmc6352.c
misc: hmc6352: fix potential Spectre v1
2018-09-12 09:31:00 +02:00
hpilo.c
vfs: do bulk POLL* -> EPOLL* replacement
2018-02-11 14:34:03 -08:00
hpilo.h
misc: hpilo: Use SPDX-License-Identifier
2017-12-07 18:45:31 +01:00
ibmvmc.c
misc: ibmvsm: Fix wrong assignment of return code
2018-09-12 09:31:00 +02:00
ibmvmc.h
misc: IBM Virtual Management Channel Driver (VMC)
2018-05-14 16:35:42 +02:00
ics932s401.c
misc: ics932s401: open brace should be on the previous line
2017-12-18 16:00:57 +01:00
ioc4.c
isl29003.c
misc: isl29003: Missing a blank line after declarations
2017-12-07 18:45:31 +01:00
isl29020.c
Kconfig
misc: IBM Virtual Management Channel Driver (VMC)
2018-05-14 16:35:42 +02:00
kgdbts.c
misc: kgdbts: Fix restrict error
2018-09-25 20:21:02 +02:00
lattice-ecp3-config.c
Makefile
misc: IBM Virtual Management Channel Driver (VMC)
2018-05-14 16:35:42 +02:00
pch_phub.c
pci_endpoint_test.c
pci_endpoint_test: Add 2 ioctl commands
2018-07-19 11:46:57 +01:00
phantom.c
vfs: do bulk POLL* -> EPOLL* replacement
2018-02-11 14:34:03 -08:00
pti.c
drivers/misc/intel/pti: Rename the header file to free up the namespace
2017-12-17 12:52:34 +01:00
qcom-coincell.c
spear13xx_pcie_gadget.c
sram-exec.c
sram.c
misc: sram: remove redundant null pointer check before of_node_put
2018-09-25 20:20:59 +02:00
sram.h
tifm_7xx1.c
misc: tifm: Remove VLA
2018-04-23 13:31:27 +02:00
tifm_core.c
tsl2550.c
tsl2550: fix lux1_input error in low light
2018-07-07 17:44:52 +02:00
vexpress-syscfg.c
misc: vexpress/syscfg: Use devm_ioremap_resource() to map memory
2018-07-16 13:32:08 +02:00
vmw_balloon.c
vmw_balloon: add reset stat
2018-09-25 20:11:43 +02:00