Patch "lightnvm: pblk: protect line bitmap while submitting meta io" has been added to the 4.14-stable tree
This is a note to let you know that I've just added the patch titled
lightnvm: pblk: protect line bitmap while submitting meta io
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
lightnvm-pblk-protect-line-bitmap-while-submitting-meta-io.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Mon Dec 18 13:29:00 CET 2017
From: Rakesh Pandit <[email protected]>
Date: Fri, 13 Oct 2017 14:45:56 +0200
Subject: lightnvm: pblk: protect line bitmap while submitting meta io
From: Rakesh Pandit <[email protected]>
[ Upstream commit e57903fd972a398b7140d0bc055714e13a0e58c5 ]
It seems pblk_dealloc_page would race against pblk_alloc_pages for line bitmap for sector allocation.The chances are very low but might as well protect the bitmap properly.
--- drivers/lightnvm/pblk-core.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/lightnvm/pblk-core.c +2 -0
@@ -486,12 +486,14 @@ void pblk_dealloc_page(struct pblk *pblku64 addr;int i; +spin_lock (&line->lock); addr =find_next_zero_bit (line->map_bitmap, pblk->lm.sec_per_line, line->cur_sec); line->cur_sec = addr - nr_secs;for (i =0 ; i < nr_secs; i++, line->cur_sec--)WARN_ON (!test_and_clear_bit (line->cur_sec, line->map_bitmap)); +spin_unlock (&line->lock); }u64 __pblk_alloc_page (struct pblk *pblk,struct pblk_line *line,int nr_secs)
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/lightnvm-pblk-protect-line-bitmap-while-submitting-meta-io.patch queue-4.14/lightnvm-pblk-fix-changing-gc-group-list-for-a-line.patch