linux-stable/drivers/misc
Greg Kurz 2f07229f02 ocxl: Fix endiannes bug in read_afu_name()
The AFU Descriptor Template in the PCI config space has a Name Space
field which is a 24 Byte ASCII character string of descriptive name
space for the AFU. The OCXL driver read the string four characters at
a time with pci_read_config_dword().

This optimization is valid on a little-endian system since this is PCI,
but a big-endian system ends up with each subset of four characters in
reverse order.

This could be fixed by switching to read characters one by one. Another
option is to swap the bytes if we're big-endian.

Go for the latter with le32_to_cpu().

Cc: stable@vger.kernel.org      # v4.16
Signed-off-by: Greg Kurz <groug@kaod.org>
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>
Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-12-21 14:46:50 +11:00
..
altera-stapl
c2port
cardreader
cb710 cb710: Convert to new IDA API 2018-08-21 23:54:18 -04:00
cxl cxl: drop the dma_set_mask callback from vphb 2018-12-20 22:21:20 +11:00
echo misc: echo: Remove unnecessary parentheses and simplify check for zero 2018-09-25 20:21:02 +02:00
eeprom Merge branch 'i2c/for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2018-10-29 14:44:03 -07:00
genwqe Char/Misc driver patches for 4.20-rc1 2018-10-26 09:11:43 -07:00
ibmasm
lis3lv02d
lkdtm New gcc plugin: stackleak 2018-11-01 11:46:27 -07:00
mei mei: replace POLL* with EPOLL* for write queues. 2018-10-02 15:39:59 -07:00
mic misc: mic: scif: remove set but not used variables 'src_dma_addr, dst_dma_addr' 2018-10-15 20:47:40 +02:00
ocxl ocxl: Fix endiannes bug in read_afu_name() 2018-12-21 14:46:50 +11:00
sgi-gru Revert "mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks" 2018-10-26 16:25:19 -07:00
sgi-xp sgi-xp: Replace spin_is_locked() with lockdep 2018-10-15 20:54:17 +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 Merge branch 'work.afs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-11-01 19:58:52 -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
apds990x.c misc: apds990x: remove unused array ir_currents 2018-09-12 09:46:46 +02:00
apds9802als.c
aspeed-lpc-ctrl.c
aspeed-lpc-snoop.c
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
dummy-irq.c
enclosure.c
fsa9480.c
hmc6352.c misc: hmc6352: fix potential Spectre v1 2018-09-12 09:31:00 +02:00
hpilo.c
hpilo.h
ibmvmc.c misc: ibmvsm: Fix wrong assignment of return code 2018-09-12 09:31:00 +02:00
ibmvmc.h
ics932s401.c
ioc4.c
isl29003.c
isl29020.c
Kconfig
kgdbts.c misc: kgdbts: Fix restrict error 2018-09-25 20:21:02 +02:00
lattice-ecp3-config.c
Makefile
pch_phub.c
pci_endpoint_test.c
phantom.c
pti.c
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
tifm_core.c
tsl2550.c
vexpress-syscfg.c
vmw_balloon.c vmw_balloon: add reset stat 2018-09-25 20:11:43 +02:00