summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-02-20 12:04:14 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2022-02-20 12:04:14 -0800
commit6e8e752f705c2713005a3182c8444ef7b54f10aa (patch)
tree11b6a0d7229aef22801773803d75f2674c9df5b4
parente268d7084a90c740198579abc069813f903120aa (diff)
parentf8efca92ae509c25e0a4bd5d0a86decea4f0c41e (diff)
downloadlwn-6e8e752f705c2713005a3182c8444ef7b54f10aa.tar.gz
lwn-6e8e752f705c2713005a3182c8444ef7b54f10aa.zip
Merge tag 'edac_urgent_for_v5.17_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras
Pull EDAC fix from Borislav Petkov: "Fix a long-standing struct alignment bug in the EDAC struct allocation code" * tag 'edac_urgent_for_v5.17_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC: Fix calculation of returned address and next offset in edac_align_ptr()
-rw-r--r--drivers/edac/edac_mc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 9d9aabdec96b..f5677d81bd2d 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -215,7 +215,7 @@ void *edac_align_ptr(void **p, unsigned int size, int n_elems)
else
return (char *)ptr;
- r = (unsigned long)p % align;
+ r = (unsigned long)ptr % align;
if (r == 0)
return (char *)ptr;