<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/lightnvm/core.c, branch v4.14.217</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.217</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.217'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2017-06-27T14:22:09+00:00</updated>
<entry>
<title>lightnvm: if LUNs are already allocated fix return</title>
<updated>2017-06-27T14:22:09+00:00</updated>
<author>
<name>Rakesh Pandit</name>
<email>rakesh@tuxera.com</email>
</author>
<published>2017-06-27T11:55:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=12e9a6d62236dacb87a6b2dd84dd9c29bb5be1de'/>
<id>urn:sha1:12e9a6d62236dacb87a6b2dd84dd9c29bb5be1de</id>
<content type='text'>
While creating new device with NVM_DEV_CREATE if LUNs are already
allocated ioctl would return -ENOMEM which is wrong.  This patch
propagates -EBUSY from nvm_reserve_luns which is correct response.

Fixes: ade69e243 ("lightnvm: merge gennvm with core")
Reviewed-by: Frans Klaver &lt;fransklaver@gmail.com&gt;
Signed-off-by: Rakesh Pandit &lt;rakesh@tuxera.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: re-convert ppa format on I/O failure</title>
<updated>2017-06-26T22:24:53+00:00</updated>
<author>
<name>Javier González</name>
<email>jg@lightnvm.io</email>
</author>
<published>2017-06-26T09:57:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3e505afb45f57e84adabf7a3b0b705c7b04ad59c'/>
<id>urn:sha1:3e505afb45f57e84adabf7a3b0b705c7b04ad59c</id>
<content type='text'>
In case of a failure when submitting a request, convert the ppa_list
addresses to the target format so that it can interpret ppas for
recovery

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<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.radix-linux.su/kernel/linux.git/commit/?id=507f7d68fe5c24973dcd6e48f011bdfbd2197f01'/>
<id>urn:sha1: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>
</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.radix-linux.su/kernel/linux.git/commit/?id=8d77bb8276062ff2d991bec71389520dd0156cc3'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>ligtnvm: fix double blk_put_queue on same queue</title>
<updated>2017-04-20T14:17:47+00:00</updated>
<author>
<name>Rakesh Pandit</name>
<email>rakesh@tuxera.com</email>
</author>
<published>2017-04-20T14:17:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=75ba4ada8286d415bcaab993ce1f11125b8aa13e'/>
<id>urn:sha1:75ba4ada8286d415bcaab993ce1f11125b8aa13e</id>
<content type='text'>
On an error path in NVM_DEV_CREATE ioctl blk_put_queue is being called
twice: one via blk_cleanup_queue and another via put_disk.  Straight fix
seems to remove queue pointer so that disk_release never ends up caling
blk_put_queue again.

  [  391.808827] WARNING: CPU: 1 PID: 1250 at lib/refcount.c:128 refcount_sub_and_test+0x70/0x80
  [  391.808830] refcount_t: underflow; use-after-free.
  [ 391.808832] Modules linked in: nf_conntrack_netbios_ns............
  [  391.809052] CPU: 1 PID: 1250 Comm: nvme Not tainted.........
  [  391.809057] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
             BIOS rel-1.7.5-0-ge51488c-20140602_164612-nilsson.home.kraxel.org 04/01/2014
  [  391.809060] Call Trace:
  [  391.809079]  dump_stack+0x63/0x86
  [  391.809094]  __warn+0xcb/0xf0
  [  391.809103]  warn_slowpath_fmt+0x5f/0x80
  [  391.809118]  refcount_sub_and_test+0x70/0x80
  [  391.809125]  refcount_dec_and_test+0x11/0x20
  [  391.809136]  kobject_put+0x1f/0x60
  [  391.809149]  blk_put_queue+0x15/0x20
  [  391.809159]  disk_release+0xae/0xf0
  [  391.809172]  device_release+0x32/0x90
  [  391.809184]  kobject_release+0x6a/0x170
  [  391.809196]  kobject_put+0x2f/0x60
  [  391.809206]  put_disk+0x17/0x20
  [  391.809219]  nvm_ioctl_dev_create.isra.16+0x897/0xa30
  [  391.809236]  nvm_ctl_ioctl+0x23c/0x4c0
  [  391.809248]  do_vfs_ioctl+0xa3/0x5f0
  [  391.809258]  SyS_ioctl+0x79/0x90
  [  391.809271]  entry_SYSCALL_64_fastpath+0x1a/0xa9
  [  391.809280] RIP: 0033:0x7f5d3ef363c7
  [  391.809286] RSP: 002b:00007ffc72ed8d78 EFLAGS: 00000206 ORIG_RAX: 0000000000000010
  [  391.809296] RAX: ffffffffffffffda RBX: 00007ffc72edb552 RCX: 00007f5d3ef363c7
  [  391.809301] RDX: 00007ffc72ed8d90 RSI: 0000000040804c22 RDI: 0000000000000003
  [  391.809306] RBP: 0000000000000001 R08: 0000000000000020 R09: 0000000000000001
  [  391.809311] R10: 000000000000053f R11: 0000000000000206 R12: 0000000000000000
  [  391.809316] R13: 0000000000000000 R14: 00007ffc72edb58d R15: 00007ffc72edb581

Signed-off-by: Rakesh Pandit &lt;rakesh@tuxera.com&gt;
Reviewed-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Fixes: 7d1ef2f408ab "lightnvm: fix cleanup order of disk on init error"
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>lightnvm: convert sprintf into strlcpy</title>
<updated>2017-04-16T16:06:25+00:00</updated>
<author>
<name>Javier González</name>
<email>jg@lightnvm.io</email>
</author>
<published>2017-04-15T18:55:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6eb082452df1218e9c0ce1168c456f839ce5acb2'/>
<id>urn:sha1:6eb082452df1218e9c0ce1168c456f839ce5acb2</id>
<content type='text'>
Convert sprintf calls to strlcpy in order to make possible buffer
overflow more obvious.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>lightnvm: clean unused variable</title>
<updated>2017-04-16T16:06:25+00:00</updated>
<author>
<name>Javier González</name>
<email>jg@lightnvm.io</email>
</author>
<published>2017-04-15T18:55:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5d30f3bd5578cd02c9aaf273e854d89b1ca91bb8'/>
<id>urn:sha1:5d30f3bd5578cd02c9aaf273e854d89b1ca91bb8</id>
<content type='text'>
Clean unused variable on lightnvm core.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>lightnvm: make nvm_free static</title>
<updated>2017-04-16T16:06:25+00:00</updated>
<author>
<name>Javier González</name>
<email>jg@lightnvm.io</email>
</author>
<published>2017-04-15T18:55:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=46b160ceda405746c10d0e73d3a73fb5219f7fd3'/>
<id>urn:sha1:46b160ceda405746c10d0e73d3a73fb5219f7fd3</id>
<content type='text'>
Prefix the nvm_free static function with a missing static keyword.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>lightnvm: allow to init targets on factory mode</title>
<updated>2017-04-16T16:06:25+00:00</updated>
<author>
<name>Javier González</name>
<email>jg@lightnvm.io</email>
</author>
<published>2017-04-15T18:55:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4af3f75d7992dd0dc49da95fbc039fa3806fba4f'/>
<id>urn:sha1:4af3f75d7992dd0dc49da95fbc039fa3806fba4f</id>
<content type='text'>
Target initialization has two responsibilities: creating the target
partition and instantiating the target. This patch enables to create a
factory partition (e.g., do not trigger recovery on the given target).
This is useful for target development and for being able to restore the
device state at any moment in time without requiring a full-device
erase.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>lightnvm: fix cleanup order of disk on init error</title>
<updated>2017-04-16T16:06:25+00:00</updated>
<author>
<name>Javier González</name>
<email>jg@lightnvm.io</email>
</author>
<published>2017-04-15T18:55:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7d1ef2f408abecc05f9dfaec1095098a090879dc'/>
<id>urn:sha1:7d1ef2f408abecc05f9dfaec1095098a090879dc</id>
<content type='text'>
Reorder disk allocation such that the disk structure can be put
safely.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
</feed>
