]> git.baikalelectronics.ru Git - kernel.git/commit
dm thin: allocate the cell_sort_array dynamically
authorJoe Thornber <ejt@redhat.com>
Fri, 3 Jul 2015 09:22:42 +0000 (10:22 +0100)
committerMike Snitzer <snitzer@redhat.com>
Mon, 6 Jul 2015 01:59:37 +0000 (21:59 -0400)
commit9703f8c7bd3659dcb5340a1cf76d87e8234d10bb
tree96a7061154282acf52ae7b2145d4669426073880
parent176f5ac2c705532a025e34d2b893cb117d0877e8
dm thin: allocate the cell_sort_array dynamically

Given the pool's cell_sort_array holds 8192 pointers it triggers an
order 5 allocation via kmalloc.  This order 5 allocation is prone to
failure as system memory gets more fragmented over time.

Fix this by allocating the cell_sort_array using vmalloc.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org
drivers/md/dm-thin.c