linux-stable/drivers/edac
Eliav Farber 4feddbe547 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:57:35 +01:00
..
altera_edac.c EDAC/altera: Fix deferred probing 2022-02-08 18:16:30 +01:00
altera_edac.h
amd64_edac.c EDAC/amd64: Fix PCI component registration 2020-12-29 13:47:06 +01:00
amd64_edac.h EDAC, amd64: Add Family 17h, models 10h-2fh support 2018-11-13 11:15:06 -08:00
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_device.c
edac_device.h
edac_device_sysfs.c EDAC: Fix reference count leaks 2020-08-21 09:48:03 +02:00
edac_mc.c EDAC: Fix calculation of returned address and next offset in edac_align_ptr() 2022-02-23 11:57:35 +01:00
edac_mc.h
edac_mc_sysfs.c EDAC: Fix global-out-of-bounds write when setting edac_mc_poll_msec 2019-07-31 07:28:31 +02:00
edac_module.c
edac_module.h EDAC: Fix global-out-of-bounds write when setting edac_mc_poll_msec 2019-07-31 07:28:31 +02:00
edac_pci.c
edac_pci.h
edac_pci_sysfs.c EDAC: Fix reference count leaks 2020-08-21 09:48:03 +02:00
fsl_ddr_edac.c
fsl_ddr_edac.h
ghes_edac.c EDAC/ghes: Fix grain calculation 2019-12-31 12:37:36 +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:15:06 -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:07:00 +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:22:27 +02:00
Kconfig EDAC/mpc85xx: Prevent building as a module 2019-06-15 11:54:52 +02:00
layerscape_edac.c
Makefile
mce_amd.c x86/mce/AMD, EDAC/mce_amd: Enumerate Reserved SMCA bank type 2018-04-19 08:56:20 +02:00
mce_amd.h
mpc85xx_edac.c
mpc85xx_edac.h
mv64x60_edac.c EDAC, mv64x60: Fix an error handling path 2018-04-12 12:32:19 +02:00
mv64x60_edac.h
octeon_edac-l2c.c
octeon_edac-lmc.c
octeon_edac-pc.c
octeon_edac-pci.c
pasemi_edac.c
pnd2_edac.c EDAC, pnd2: Fix ioremap() size in dnv_rd_reg() 2019-10-05 12:47:49 +02:00
pnd2_edac.h
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:40:23 +01:00
skx_edac.c EDAC, skx_edac: Fix logical channel intermediate decoding 2018-11-13 11:15:06 -08:00
synopsys_edac.c EDAC/synopsys: Fix wrong value type assignment for edac_mode 2021-10-06 15:05:09 +02:00
thunderx_edac.c EDAC, thunderx: Fix memory leak in thunderx_l2c_threaded_isr() 2019-12-01 09:13:19 +01:00
tile_edac.c
wq.c
x38_edac.c
xgene_edac.c EDAC/xgene: Fix deferred probing 2022-02-08 18:16:30 +01:00