Skip to content

Commit

Permalink
Merge tag 'edac_urgent_for_v5.17_rc5' of git://git.kernel.org/pub/scm…
Browse files Browse the repository at this point in the history
…/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()
  • Loading branch information
Linus Torvalds committed Feb 20, 2022
2 parents e268d70 + f8efca9 commit 6e8e752
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/edac/edac_mc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6e8e752

Please sign in to comment.