<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/lightnvm, branch v4.12.2</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>lightnvm: fix bad back free on error path</title>
<updated>2017-05-04T13:53:04+00:00</updated>
<author>
<name>Javier González</name>
<email>jg@lightnvm.io</email>
</author>
<published>2017-05-03T09:19:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=507f7d68fe5c24973dcd6e48f011bdfbd2197f01'/>
<id>507f7d68fe5c24973dcd6e48f011bdfbd2197f01</id>
<content type='text'>
Free memory correctly when an allocation fails on a loop and we free
backwards previously successful allocations.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Reviewed-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Free memory correctly when an allocation fails on a loop and we free
backwards previously successful allocations.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Reviewed-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lightnvm: fix possible memory leak in pblk_bb_discovery()</title>
<updated>2017-04-25T16:44:29+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>weiyongjun1@huawei.com</email>
</author>
<published>2017-04-25T16:15:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5136a4fd5832af12ec5e5961c52a27a524a0a9d9'/>
<id>5136a4fd5832af12ec5e5961c52a27a524a0a9d9</id>
<content type='text'>
'blks' is malloced in pblk_bb_discovery() and should be freed
before leaving from the nvm_get_tgt_bb_tbl() error handling cases,
otherwise it will cause memory leak. Also skip assign blks to
rlun-&gt;bb_list when error.

Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target")
Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Reviewed-by: Javier GonzÃ¡lez &lt;javier@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'blks' is malloced in pblk_bb_discovery() and should be freed
before leaving from the nvm_get_tgt_bb_tbl() error handling cases,
otherwise it will cause memory leak. Also skip assign blks to
rlun-&gt;bb_list when error.

Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target")
Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Reviewed-by: Javier GonzÃ¡lez &lt;javier@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lightnvm: pblk: fix erase counters on error fail</title>
<updated>2017-04-23T22:57:52+00:00</updated>
<author>
<name>Javier González</name>
<email>jg@lightnvm.io</email>
</author>
<published>2017-04-21T23:32:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a44f53faf4674d84cba79f7ee574584e18ab8744'/>
<id>a44f53faf4674d84cba79f7ee574584e18ab8744</id>
<content type='text'>
When block erases fail, these blocks are marked bad. The number of valid
blocks in the line was not updated, which could cause an infinite loop
on the erase path.

Fix this atomic counter and, in order to avoid taking an irq lock on the
interrupt context, make the erase counters atomic too.

Also, in the case that a significant number of blocks become bad in a
line, the result is the double shared metadata buffer (emeta) to stop
the pipeline until all metadata is flushed to the media. Increase the
number of metadata lines from 2 to 4 to avoid this case.

Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target"

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Reviewed-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When block erases fail, these blocks are marked bad. The number of valid
blocks in the line was not updated, which could cause an infinite loop
on the erase path.

Fix this atomic counter and, in order to avoid taking an irq lock on the
interrupt context, make the erase counters atomic too.

Also, in the case that a significant number of blocks become bad in a
line, the result is the double shared metadata buffer (emeta) to stop
the pipeline until all metadata is flushed to the media. Increase the
number of metadata lines from 2 to 4 to avoid this case.

Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target"

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Reviewed-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lightnvm: pblk: free metadata on line alloc failure</title>
<updated>2017-04-23T22:57:52+00:00</updated>
<author>
<name>Javier González</name>
<email>jg@lightnvm.io</email>
</author>
<published>2017-04-21T23:32:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=be388d9fbd4e09582e31c3ee82a022e368208ae3'/>
<id>be388d9fbd4e09582e31c3ee82a022e368208ae3</id>
<content type='text'>
When a line allocation fails, for example, due to having too many bad
blocks, free its metadata correctly.

Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target"

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Reviewed-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a line allocation fails, for example, due to having too many bad
blocks, free its metadata correctly.

Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target"

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Reviewed-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lightnvm: pblk: fix memory leak on error path</title>
<updated>2017-04-23T22:57:52+00:00</updated>
<author>
<name>Javier González</name>
<email>jg@lightnvm.io</email>
</author>
<published>2017-04-21T23:32:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=33db9fd46ea8e3e6d4757d99a3f97bd1a0c919f3'/>
<id>33db9fd46ea8e3e6d4757d99a3f97bd1a0c919f3</id>
<content type='text'>
When write recovery fails, Free memory for the recovery structure.

Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target"

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Reviewed-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When write recovery fails, Free memory for the recovery structure.

Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target"

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Reviewed-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lightnvm: pblk: fix bad error check</title>
<updated>2017-04-23T22:57:52+00:00</updated>
<author>
<name>Javier González</name>
<email>jg@lightnvm.io</email>
</author>
<published>2017-04-21T23:32:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f3236cef5a206c27a624b8a813ddc1ebc4c6637a'/>
<id>f3236cef5a206c27a624b8a813ddc1ebc4c6637a</id>
<content type='text'>
Fix bad error check

Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target"

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Reviewed-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix bad error check

Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target"

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Reviewed-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lightnvm: pblk: fix race condition on line retry</title>
<updated>2017-04-23T22:57:52+00:00</updated>
<author>
<name>Javier González</name>
<email>jg@lightnvm.io</email>
</author>
<published>2017-04-21T23:32:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3dc001f343659e4732b4ff6da1c28edbd56c6e15'/>
<id>3dc001f343659e4732b4ff6da1c28edbd56c6e15</id>
<content type='text'>
When a pblk line fails (or is recovered), make sure to take the line
management lock.

Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target"

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Reviewed-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a pblk line fails (or is recovered), make sure to take the line
management lock.

Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target"

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Reviewed-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lightnvm: don't print a warning for ADDR_EMPTY</title>
<updated>2017-04-21T22:49:56+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2017-04-21T22:49:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=659226eb630ff522b30d8b8a82c9e722756e6bd4'/>
<id>659226eb630ff522b30d8b8a82c9e722756e6bd4</id>
<content type='text'>
Reading from ADDR_EMPTY is out of bounds.  The current code generates a
static checker warning because we check for out of bounds "lba" before
we check for ADDR_EMPTY, so the second check is always false.  It looks
like we intended ADDR_EMPTY to be a no-op without printing a warning.

Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reading from ADDR_EMPTY is out of bounds.  The current code generates a
static checker warning because we check for out of bounds "lba" before
we check for ADDR_EMPTY, so the second check is always false.  It looks
like we intended ADDR_EMPTY to be a no-op without printing a warning.

Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lightnvm: potential underflow in pblk_read_rq()</title>
<updated>2017-04-21T22:48:40+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2017-04-21T22:48:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5bf1e1ee6269f4db307bdfce45d196d6c9bc818a'/>
<id>5bf1e1ee6269f4db307bdfce45d196d6c9bc818a</id>
<content type='text'>
This is a static checker fix, and perhaps not a real bug.  The static
checker thinks that nr_secs could be negative.  It would result in
zeroing more memory than intended.  Anyway, even if it's not a bug,
changing this variable to unsigned makes the code easier to audit.

Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a static checker fix, and perhaps not a real bug.  The static
checker thinks that nr_secs could be negative.  It would result in
zeroing more memory than intended.  Anyway, even if it's not a bug,
changing this variable to unsigned makes the code easier to audit.

Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lightnvm: propagate pblk_init return to userspace</title>
<updated>2017-04-21T18:40:41+00:00</updated>
<author>
<name>Rakesh Pandit</name>
<email>rakesh@tuxera.com</email>
</author>
<published>2017-04-20T18:23:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8d77bb8276062ff2d991bec71389520dd0156cc3'/>
<id>8d77bb8276062ff2d991bec71389520dd0156cc3</id>
<content type='text'>
From userspace calling ioctl(NVM_DEV_CREATE) was returning ENOMEM for
invalid arguments even though pblk (pblk_init) was returning correctly
-EINVAL to nvm_create_tgt inside core.  This patch propagates the
correct return value to userspace.

Because pblk was introduced recently this only needs to go in 4.12.

Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target")
Signed-off-by: Rakesh Pandit &lt;rakesh@tuxera.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
From userspace calling ioctl(NVM_DEV_CREATE) was returning ENOMEM for
invalid arguments even though pblk (pblk_init) was returning correctly
-EINVAL to nvm_create_tgt inside core.  This patch propagates the
correct return value to userspace.

Because pblk was introduced recently this only needs to go in 4.12.

Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target")
Signed-off-by: Rakesh Pandit &lt;rakesh@tuxera.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
