Commit 6e8e752f authored by Linus Torvalds's avatar Linus Torvalds

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()
parents e268d708 f8efca92
...@@ -215,7 +215,7 @@ void *edac_align_ptr(void **p, unsigned int size, int n_elems) ...@@ -215,7 +215,7 @@ void *edac_align_ptr(void **p, unsigned int size, int n_elems)
else else
return (char *)ptr; return (char *)ptr;
r = (unsigned long)p % align; r = (unsigned long)ptr % align;
if (r == 0) if (r == 0)
return (char *)ptr; return (char *)ptr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment