]> git.baikalelectronics.ru Git - kernel.git/commit
null_blk: prevent crash from bad home_node value
authorJohn Pittman <jpittman@redhat.com>
Fri, 5 Apr 2019 21:42:45 +0000 (17:42 -0400)
committerJens Axboe <axboe@kernel.dk>
Sat, 6 Apr 2019 16:51:08 +0000 (10:51 -0600)
commit3da6a7b3660772c234bd2702d0f906c93622a78f
tree28d71c37e524712b89d51d72a15586baa0661f0b
parent0e294ff42f9db8b4f1df485a190f17d47cae1c59
null_blk: prevent crash from bad home_node value

At module load, if the selected home_node value is greater than
the available numa nodes, the system will crash in
__alloc_pages_nodemask() due to a bad paging request.  Prevent this
user error crash by detecting the bad value, logging an error, and
setting g_home_node back to the default of NUMA_NO_NODE.

Signed-off-by: John Pittman <jpittman@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/null_blk_main.c