Whamcloud - gitweb
LU-10026 ptlrpc: verify large allocations are aligned 44/57844/15
authorPatrick Farrell <pfarrell@whamcloud.com>
Thu, 28 Sep 2023 00:09:03 +0000 (20:09 -0400)
committerOleg Drokin <green@whamcloud.com>
Sat, 7 Jun 2025 23:00:09 +0000 (23:00 +0000)
commit4c972aa6696a50ddfbc0dcb3e8db36f4b435fa4e
tree02346ae353aa500972e1d5c88d3db26f1d8bc406
parente505e7dbfb8b58a7a2ef9178b56f8b7668a18329
LU-10026 ptlrpc: verify large allocations are aligned

If we were ever to do an allocation with kmalloc(), we could
get non-page-aligned memory.

We haven't seen any problem yet, but we are trying to be ready for
this in advance. The arguments from https://lwn.net/Articles/787740/
also look strong.

Let's add an assertion to illuminate this dangerous behaviour.

EX-bug-id: EX-8245
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Signed-off-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Change-Id: Id20898065b516d363d9dc280e71be1b5cfb6f4a7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57844
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
lustre/obdclass/page_pools.c