]> www.infradead.org Git - users/jedix/linux-maple.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Aug 2015 16:29:06 +0000 (09:29 -0700)
commitb2ce140833c6cc81068f2c9d2cbefd78be7550bf
tree5b97271a79cabe55f14bee89736be0ca584b3b69
parent3fa6173cb7abee0d4fe493bc71665aa12188bace
dm thin: allocate the cell_sort_array dynamically

commit a822c83e47d97cdef38c4352e1ef62d9f46cfe98 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-thin.c