<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/block, branch v3.13</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.13</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.13'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2013-12-06T16:18:02Z</updated>
<entry>
<title>block: fix memory leaks on unplugging block device</title>
<updated>2013-12-06T16:18:02Z</updated>
<author>
<name>Andrey Vagin</name>
<email>avagin@openvz.org</email>
</author>
<published>2013-12-06T05:06:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8515736604941334bd9e8fc01edea685a228acd5'/>
<id>urn:sha1:8515736604941334bd9e8fc01edea685a228acd5</id>
<content type='text'>
All objects, which are allocated in blk_mq_register_disk, must be
released in blk_mq_unregister_disk.

I use a KVM virtual machine and virtio disk to reproduce this issue.

kmemleak: 18 new suspected memory leaks (see /sys/kernel/debug/kmemleak)
$ cat /sys/kernel/debug/kmemleak | head -n 30
unreferenced object 0xffff8800b6636150 (size 8):
  comm "kworker/0:2", pid 65, jiffies 4294809903 (age 86.358s)
  hex dump (first 8 bytes):
    76 69 72 74 69 6f 34 00                          virtio4.
  backtrace:
    [&lt;ffffffff8165d41e&gt;] kmemleak_alloc+0x4e/0xb0
    [&lt;ffffffff8118cfc5&gt;] __kmalloc_track_caller+0xf5/0x260
    [&lt;ffffffff81155b11&gt;] kstrdup+0x31/0x60
    [&lt;ffffffff812242be&gt;] sysfs_new_dirent+0x2e/0x140
    [&lt;ffffffff81224678&gt;] create_dir+0x38/0xe0
    [&lt;ffffffff812249e3&gt;] sysfs_create_dir_ns+0x73/0xc0
    [&lt;ffffffff8130dfa9&gt;] kobject_add_internal+0xc9/0x340
    [&lt;ffffffff8130e535&gt;] kobject_add+0x65/0xb0
    [&lt;ffffffff813f34f8&gt;] device_add+0x128/0x660
    [&lt;ffffffff813f3a4a&gt;] device_register+0x1a/0x20
    [&lt;ffffffff813ae6f8&gt;] register_virtio_device+0x98/0xe0
    [&lt;ffffffff813b0cce&gt;] virtio_pci_probe+0x12e/0x1c0
    [&lt;ffffffff81340675&gt;] local_pci_probe+0x45/0xa0
    [&lt;ffffffff81341a51&gt;] pci_device_probe+0x121/0x130
    [&lt;ffffffff813f67f7&gt;] driver_probe_device+0x87/0x390
    [&lt;ffffffff813f6b3b&gt;] __device_attach+0x3b/0x40
unreferenced object 0xffff8800b65aa1d8 (size 144):

Fixes: 320ae51feed5 (blk-mq: new multi-queue block IO queueing mechanism)
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Andrey Vagin &lt;avagin@openvz.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.dk/linux-block</title>
<updated>2013-12-05T23:33:27Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-12-05T23:33:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5ee540613db504a10e15fafaf4c08cac96aa1823'/>
<id>urn:sha1:5ee540613db504a10e15fafaf4c08cac96aa1823</id>
<content type='text'>
Pull block layer fixes from Jens Axboe:
 "A small collection of fixes for the current series. It contains:

   - A fix for a use-after-free of a request in blk-mq.  From Ming Lei

   - A fix for a blk-mq bug that could attempt to dereference a NULL rq
     if allocation failed

   - Two xen-blkfront small fixes

   - Cleanup of submit_bio_wait() type uses in the kernel, unifying
     that.  From Kent

   - A fix for 32-bit blkg_rwstat reading.  I apologize for this one
     looking mangled in the shortlog, it's entirely my fault for missing
     an empty line between the description and body of the text"

* 'for-linus' of git://git.kernel.dk/linux-block:
  blk-mq: fix use-after-free of request
  blk-mq: fix dereference of rq-&gt;mq_ctx if allocation fails
  block: xen-blkfront: Fix possible NULL ptr dereference
  xen-blkfront: Silence pfn maybe-uninitialized warning
  block: submit_bio_wait() conversions
  Update of blkg_stat and blkg_rwstat may happen in bh context
</content>
</entry>
<entry>
<title>blk-mq: fix use-after-free of request</title>
<updated>2013-12-05T17:50:39Z</updated>
<author>
<name>Ming Lei</name>
<email>tom.leiming@gmail.com</email>
</author>
<published>2013-12-05T17:50:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0d11e6aca396e679c07b2dd6af5dc8b7f041fbbd'/>
<id>urn:sha1:0d11e6aca396e679c07b2dd6af5dc8b7f041fbbd</id>
<content type='text'>
If accounting is on, we will do the IO completion accounting after
we have freed the request. Fix that by moving it sooner instead.

Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>blk-mq: fix dereference of rq-&gt;mq_ctx if allocation fails</title>
<updated>2013-12-03T21:24:28Z</updated>
<author>
<name>Jeff Moyer</name>
<email>jmoyer@redhat.com</email>
</author>
<published>2013-12-03T21:23:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=959a35f13eb785f982d79b1aaa75872d05c821da'/>
<id>urn:sha1:959a35f13eb785f982d79b1aaa75872d05c821da</id>
<content type='text'>
If __GFP_WAIT isn't set and we fail allocating, when we go
to drop the reference on the ctx, we will attempt to dereference
the NULL rq. Fix that.

Signed-off-by: Jeff Moyer &lt;jmoyer@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: submit_bio_wait() conversions</title>
<updated>2013-11-24T23:33:41Z</updated>
<author>
<name>Kent Overstreet</name>
<email>kmo@daterainc.com</email>
</author>
<published>2013-11-24T23:32:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c170bbb45febc03ac4d34ba2b8bb55e06104b7e7'/>
<id>urn:sha1:c170bbb45febc03ac4d34ba2b8bb55e06104b7e7</id>
<content type='text'>
It was being open coded in a few places.

Signed-off-by: Kent Overstreet &lt;kmo@daterainc.com&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Joern Engel &lt;joern@logfs.org&gt;
Cc: Prasad Joshi &lt;prasadjoshi.linux@gmail.com&gt;
Cc: Neil Brown &lt;neilb@suse.de&gt;
Cc: Chris Mason &lt;chris.mason@fusionio.com&gt;
Acked-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block/partitions/efi.c: fix bound check</title>
<updated>2013-11-22T00:42:27Z</updated>
<author>
<name>Antti P Miettinen</name>
<email>amiettinen@nvidia.com</email>
</author>
<published>2013-11-21T22:32:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=49204c116a9ee24536d371be02a2f05e6493c949'/>
<id>urn:sha1:49204c116a9ee24536d371be02a2f05e6493c949</id>
<content type='text'>
Use ARRAY_SIZE instead of sizeof to get proper max for label length.

Since this is just a read out of bounds it's not that bad, but the
problem becomes user-visible eg if one tries to use DEBUG_PAGEALLOC and
DEBUG_RODATA, at least with some enhancements from Hiroshi.  Of course
the destination array can contain garbage when we read beyond the end of
source array so that would be another user-visible problem.

Signed-off-by: Antti P Miettinen &lt;amiettinen@nvidia.com&gt;
Reviewed-by: Hiroshi Doyu &lt;hdoyu@nvidia.com&gt;
Tested-by: Hiroshi Doyu &lt;hdoyu@nvidia.com&gt;
Cc: Will Drewry &lt;wad@chromium.org&gt;
Cc: Matt Fleming &lt;matt.fleming@intel.com&gt;
Acked-by: Davidlohr Bueso &lt;davidlohr@hp.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Update of blkg_stat and blkg_rwstat may happen in bh context.</title>
<updated>2013-11-20T22:33:04Z</updated>
<author>
<name>Hong Zhiguo</name>
<email>zhiguohong@tencent.com</email>
</author>
<published>2013-11-20T17:35:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2c575026fae6e63771bd2a4c1d407214a8096a89'/>
<id>urn:sha1:2c575026fae6e63771bd2a4c1d407214a8096a89</id>
<content type='text'>
While u64_stats_fetch_retry is only preempt_disable on 32bit
UP system. This is not enough to avoid preemption by bh and
may read strange 64 bit value.

Signed-off-by: Hong Zhiguo &lt;zhiguohong@tencent.com&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: stable@kernel.org
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>blk-mq: add blktrace insert event trace</title>
<updated>2013-11-20T02:00:45Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2013-11-20T01:59:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=01b983c9fcfeea5774ca2df2e167b68c3c299278'/>
<id>urn:sha1:01b983c9fcfeea5774ca2df2e167b68c3c299278</id>
<content type='text'>
We need it to make 'btt' from blktrace happy, otherwise
we are missing one state transition.

Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>blk-mq: ensure that we set REQ_IO_STAT so diskstats work</title>
<updated>2013-11-19T16:25:07Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2013-11-19T16:25:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=94eddfbeaafa3e8040a2c47d370dea0e58e76941'/>
<id>urn:sha1:94eddfbeaafa3e8040a2c47d370dea0e58e76941</id>
<content type='text'>
If disk stats are enabled on the queue, a request needs to
be marked with REQ_IO_STAT for accounting to be active on
that request. This fixes an issue with virtio-blk not
showing up in /proc/diskstats after the conversion to
blk-mq.

Add QUEUE_FLAG_MQ_DEFAULT, setting stats and same cpu-group
completion on by default.

Reported-by: Dave Chinner &lt;david@fromorbit.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.dk/linux-block</title>
<updated>2013-11-16T00:33:41Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-11-16T00:33:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f412f2c60b480fa5140a4b4cb321cd48c64e1812'/>
<id>urn:sha1:f412f2c60b480fa5140a4b4cb321cd48c64e1812</id>
<content type='text'>
Pull second round of block driver updates from Jens Axboe:
 "As mentioned in the original pull request, the bcache bits were pulled
  because of their dependency on the immutable bio vecs.  Kent re-did
  this part and resubmitted it, so here's the 2nd round of (mostly)
  driver updates for 3.13.  It contains:

 - The bcache work from Kent.

 - Conversion of virtio-blk to blk-mq.  This removes the bio and request
   path, and substitutes with the blk-mq path instead.  The end result
   almost 200 deleted lines.  Patch is acked by Asias and Christoph, who
   both did a bunch of testing.

 - A removal of bootmem.h include from Grygorii Strashko, part of a
   larger series of his killing the dependency on that header file.

 - Removal of __cpuinit from blk-mq from Paul Gortmaker"

* 'for-linus' of git://git.kernel.dk/linux-block: (56 commits)
  virtio_blk: blk-mq support
  blk-mq: remove newly added instances of __cpuinit
  bcache: defensively handle format strings
  bcache: Bypass torture test
  bcache: Delete some slower inline asm
  bcache: Use ida for bcache block dev minor
  bcache: Fix sysfs splat on shutdown with flash only devs
  bcache: Better full stripe scanning
  bcache: Have btree_split() insert into parent directly
  bcache: Move spinlock into struct time_stats
  bcache: Kill sequential_merge option
  bcache: Kill bch_next_recurse_key()
  bcache: Avoid deadlocking in garbage collection
  bcache: Incremental gc
  bcache: Add make_btree_freeing_key()
  bcache: Add btree_node_write_sync()
  bcache: PRECEDING_KEY()
  bcache: bch_(btree|extent)_ptr_invalid()
  bcache: Don't bother with bucket refcount for btree node allocations
  bcache: Debug code improvements
  ...
</content>
</entry>
</feed>
