linux-stable/drivers/edac
Eliav Farber e550e3b85c EDAC: Fix calculation of returned address and next offset in edac_align_ptr()
commit f8efca92ae upstream.

Do alignment logic properly and use the "ptr" local variable for
calculating the remainder of the alignment.

This became an issue because struct edac_mc_layer has a size that is not
zero modulo eight, and the next offset that was prepared for the private
data was unaligned, causing an alignment exception.

The patch in Fixes: which broke this actually wanted to "what we
actually care about is the alignment of the actual pointer that's about
to be returned." But it didn't check that alignment.

Use the correct variable "ptr" for that.

  [ bp: Massage commit message. ]

Fixes: 8447c4d15e ("edac: Do alignment logic properly in edac_align_ptr()")
Signed-off-by: Eliav Farber <farbere@amazon.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220113100622.12783-2-farbere@amazon.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-23 11:56:41 +01:00
..
Kconfig
Makefile
altera_edac.c EDAC/altera: Fix deferred probing 2022-02-08 18:15:30 +01:00
altera_edac.h
amd64_edac.c EDAC/amd64: Read back the scrub rate PCI register on F15h 2020-07-09 09:35:55 +02:00
amd64_edac.h
amd64_edac_dbg.c
amd64_edac_inj.c
amd76x_edac.c
amd8111_edac.c
amd8111_edac.h
amd8131_edac.c
amd8131_edac.h
cell_edac.c
cpc925_edac.c
debugfs.c
e7xxx_edac.c
e752x_edac.c
edac_core.h
edac_device.c
edac_device_sysfs.c EDAC: Fix reference count leaks 2020-08-21 11:01:56 +02:00
edac_mc.c EDAC: Fix calculation of returned address and next offset in edac_align_ptr() 2022-02-23 11:56:41 +01:00
edac_mc_sysfs.c EDAC: Fix global-out-of-bounds write when setting edac_mc_poll_msec 2019-08-04 09:33:23 +02:00
edac_module.c
edac_module.h EDAC: Fix global-out-of-bounds write when setting edac_mc_poll_msec 2019-08-04 09:33:23 +02:00
edac_pci.c
edac_pci_sysfs.c EDAC: Fix reference count leaks 2020-08-21 11:01:56 +02:00
edac_stub.c
fsl_ddr_edac.c
fsl_ddr_edac.h
ghes_edac.c EDAC/ghes: Fix grain calculation 2020-01-04 13:39:51 +01:00
highbank_l2_edac.c
highbank_mc_edac.c
i7core_edac.c EDAC, {i7core,sb,skx}_edac: Fix uncorrected error counting 2018-11-13 11:16:56 -08:00
i3000_edac.c
i3200_edac.c
i5000_edac.c
i5100_edac.c EDAC/i5100: Fix error handling order in i5100_init_one() 2020-10-29 09:05:32 +01:00
i5400_edac.c
i7300_edac.c
i82443bxgx_edac.c
i82860_edac.c
i82875p_edac.c
i82975x_edac.c
ie31200_edac.c EDAC/ie31200: Fallback if host bridge device is already initialized 2020-09-03 11:21:18 +02:00
layerscape_edac.c
mce_amd.c
mce_amd.h
mpc85xx_edac.c
mpc85xx_edac.h
mv64x60_edac.c
mv64x60_edac.h
octeon_edac-l2c.c
octeon_edac-lmc.c
octeon_edac-pc.c
octeon_edac-pci.c
pasemi_edac.c
ppc4xx_edac.c
ppc4xx_edac.h
r82600_edac.c
sb_edac.c EDAC/sb_edac: Fix top-of-high-memory value for Broadwell/Haswell 2021-11-26 11:48:22 +01:00
skx_edac.c EDAC, skx_edac: Fix logical channel intermediate decoding 2018-11-13 11:16:56 -08:00
synopsys_edac.c EDAC/synopsys: Fix wrong value type assignment for edac_mode 2021-10-06 10:23:42 +02:00
tile_edac.c
wq.c
x38_edac.c
xgene_edac.c EDAC/xgene: Fix deferred probing 2022-02-08 18:15:30 +01:00