<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/block/loop.c, branch v2.6.38</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=v2.6.38</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.38'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2011-03-03T16:53:25Z</updated>
<entry>
<title>block: kill loop_mutex</title>
<updated>2011-03-03T16:53:25Z</updated>
<author>
<name>Petr Uzel</name>
<email>petr.uzel@suse.cz</email>
</author>
<published>2011-03-03T16:48:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fd51469fb68b987032e46297e0a4fe9020063c20'/>
<id>urn:sha1:fd51469fb68b987032e46297e0a4fe9020063c20</id>
<content type='text'>
Following steps lead to deadlock in kernel:

dd if=/dev/zero of=img bs=512 count=1000
losetup -f img
mkfs.ext2 /dev/loop0
mount -t ext2 -o loop /dev/loop0 mnt
umount mnt/

Stacktrace:
[&lt;c102ec04&gt;] irq_exit+0x36/0x59
[&lt;c101502c&gt;] smp_apic_timer_interrupt+0x6b/0x75
[&lt;c127f639&gt;] apic_timer_interrupt+0x31/0x38
[&lt;c101df88&gt;] mutex_spin_on_owner+0x54/0x5b
[&lt;fe2250e9&gt;] lo_release+0x12/0x67 [loop]
[&lt;c10c4eae&gt;] __blkdev_put+0x7c/0x10c
[&lt;c10a4da5&gt;] fput+0xd5/0x1aa
[&lt;fe2250cf&gt;] loop_clr_fd+0x1a9/0x1b1 [loop]
[&lt;fe225110&gt;] lo_release+0x39/0x67 [loop]
[&lt;c10c4eae&gt;] __blkdev_put+0x7c/0x10c
[&lt;c10a59d9&gt;] deactivate_locked_super+0x17/0x36
[&lt;c10b6f37&gt;] sys_umount+0x27e/0x2a5
[&lt;c10b6f69&gt;] sys_oldumount+0xb/0xe
[&lt;c1002897&gt;] sysenter_do_call+0x12/0x26
[&lt;ffffffff&gt;] 0xffffffff

Regression since 2a48fc0ab24241755dc9, which introduced the private
loop_mutex as part of the BKL removal process.

As per [1], the mutex can be safely removed.

[1] http://www.gossamer-threads.com/lists/linux/kernel/1341930

Addresses: https://bugzilla.novell.com/show_bug.cgi?id=669394
Addresses: https://bugzilla.kernel.org/show_bug.cgi?id=29172

Signed-off-by: Petr Uzel &lt;petr.uzel@suse.cz&gt;
Cc: stable@kernel.org
Reviewed-by: Nikanth Karthikesan &lt;knikanth@suse.de&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>loop: queue_lock NULL pointer derefence in blk_throtl_exit</title>
<updated>2011-01-19T15:25:02Z</updated>
<author>
<name>Sergey Senozhatsky</name>
<email>sergey.senozhatsky@gmail.com</email>
</author>
<published>2011-01-19T15:25:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ee71a968672a9951aee6014c55511007596425bc'/>
<id>urn:sha1:ee71a968672a9951aee6014c55511007596425bc</id>
<content type='text'>
Performing
$ sudo mount -o loop -o umask=0 /dev/sdb1 /mnt/
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

$ sudo modprobe -r loop

results in oops:

 BUG: unable to handle kernel NULL pointer dereference at 0000000000000004
 IP: [&lt;ffffffff812479d4&gt;] do_raw_spin_lock+0x14/0x122
 Process modprobe (pid: 6189, threadinfo ffff88009a898000, task ffff880154a88000)
 Call Trace:
  [&lt;ffffffff81486788&gt;] _raw_spin_lock_irq+0x4a/0x51
  [&lt;ffffffff8123404b&gt;] ? blk_throtl_exit+0x3b/0xa0
  [&lt;ffffffff8105b120&gt;] ? cancel_delayed_work_sync+0xd/0xf
  [&lt;ffffffff8123404b&gt;] blk_throtl_exit+0x3b/0xa0
  [&lt;ffffffff81229bc8&gt;] blk_release_queue+0x21/0x65
  [&lt;ffffffff8123bb06&gt;] kobject_release+0x51/0x66
  [&lt;ffffffff8123bab5&gt;] ? kobject_release+0x0/0x66
  [&lt;ffffffff8123ce1e&gt;] kref_put+0x43/0x4d
  [&lt;ffffffff8123ba27&gt;] kobject_put+0x47/0x4b
  [&lt;ffffffff8122717c&gt;] blk_cleanup_queue+0x56/0x5b
  [&lt;ffffffffa01c3824&gt;] loop_exit+0x68/0x844 [loop]
  [&lt;ffffffff8107cccc&gt;] sys_delete_module+0x1e8/0x25b
  [&lt;ffffffff814864c9&gt;] ? trace_hardirqs_on_thunk+0x3a/0x3f
  [&lt;ffffffff81002112&gt;] system_call_fastpath+0x16/0x1b

because of an attempt to acquire NULL queue_lock.
I added the same lines as in blk_queue_make_request -
index 44e18c0..49e6a54 100644`fall back to embedded per-queue lock'.

Signed-off-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>Fix compile warnings due to missing removal of a 'ret' variable</title>
<updated>2010-12-20T08:15:19Z</updated>
<author>
<name>Jens Axboe</name>
<email>jaxboe@fusionio.com</email>
</author>
<published>2010-12-20T08:15:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3603b8eaccc8e41d3f355b3cadd662a3dd6699fd'/>
<id>urn:sha1:3603b8eaccc8e41d3f355b3cadd662a3dd6699fd</id>
<content type='text'>
Commit a8adbe3 forgot to remove the return variable, kill it.

drivers/block/loop.c: In function 'lo_splice_actor':
drivers/block/loop.c:398: warning: unused variable 'ret'
[...]
fs/nfsd/vfs.c: In function 'nfsd_splice_actor':
fs/nfsd/vfs.c:848: warning: unused variable 'ret'

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>fs/splice: Pull buf-&gt;ops-&gt;confirm() from splice_from_pipe actors</title>
<updated>2010-12-17T07:56:44Z</updated>
<author>
<name>Michał Mirosław</name>
<email>mirq-linux@rere.qmqm.pl</email>
</author>
<published>2010-12-17T07:56:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a8adbe378b56acd5945df70753c7e8f6fe223304'/>
<id>urn:sha1:a8adbe378b56acd5945df70753c7e8f6fe223304</id>
<content type='text'>
This patch pulls calls to buf-&gt;ops-&gt;confirm() from all actors passed
(also indirectly) to splice_from_pipe_feed().

Is avoiding the call to buf-&gt;ops-&gt;confirm() while splice()ing to
/dev/null is an intentional optimization? No other user does that
and this will remove this special case.

Against current linux.git 6313e3c21743cc88bb5bd8aa72948ee1e83937b6.

Signed-off-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>block: remove REQ_HARDBARRIER</title>
<updated>2010-11-10T13:54:09Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2010-11-10T13:54:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=02e031cbc843b010e72fcc05c76113c688b2860f'/>
<id>urn:sha1:02e031cbc843b010e72fcc05c76113c688b2860f</id>
<content type='text'>
REQ_HARDBARRIER is dead now, so remove the leftovers.  What's left
at this point is:

 - various checks inside the block layer.
 - sanity checks in bio based drivers.
 - now unused bio_empty_barrier helper.
 - Xen blockfront use of BLKIF_OP_WRITE_BARRIER - it's dead for a while,
   but Xen really needs to sort out it's barrier situaton.
 - setting of ordered tags in uas - dead code copied from old scsi
   drivers.
 - scsi different retry for barriers - it's dead and should have been
   removed when flushes were converted to FS requests.
 - blktrace handling of barriers - removed.  Someone who knows blktrace
   better should add support for REQ_FLUSH and REQ_FUA, though.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>loop: Properly clear sysfs in autoclear mode</title>
<updated>2010-10-28T01:51:30Z</updated>
<author>
<name>Milan Broz</name>
<email>mbroz@redhat.com</email>
</author>
<published>2010-10-28T01:51:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=51a0bb0c2e614659132fce272c8a1815a12c5c2a'/>
<id>urn:sha1:51a0bb0c2e614659132fce272c8a1815a12c5c2a</id>
<content type='text'>
In autoclear mode bdev is NULL but the sysfs
entry should be destroyed otherwise this warning appears:

WARNING: at fs/sysfs/dir.c:451 sysfs_add_one+0x82/0x95()
sysfs: cannot create duplicate filename '/devices/virtual/block/loop0/loop'

Fixes commit ee86273062cbb310665fe49e1f1937d2cf85b0b9

Signed-off-by: Milan Broz &lt;mbroz@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>mm: strictly nested kmap_atomic()</title>
<updated>2010-10-26T23:52:08Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2010-10-26T21:21:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=61ecdb801ef2cd28e32442383106d7837d76deac'/>
<id>urn:sha1:61ecdb801ef2cd28e32442383106d7837d76deac</id>
<content type='text'>
Ensure kmap_atomic() usage is strictly nested

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Reviewed-by: Rik van Riel &lt;riel@redhat.com&gt;
Acked-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Hugh Dickins &lt;hughd@google.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Russell King &lt;rmk@arm.linux.org.uk&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&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>Merge branch 'for-2.6.37/barrier' of git://git.kernel.dk/linux-2.6-block</title>
<updated>2010-10-23T00:07:18Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-10-23T00:07:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a2887097f25cd38cadfc11d10769e2b349fb5eca'/>
<id>urn:sha1:a2887097f25cd38cadfc11d10769e2b349fb5eca</id>
<content type='text'>
* 'for-2.6.37/barrier' of git://git.kernel.dk/linux-2.6-block: (46 commits)
  xen-blkfront: disable barrier/flush write support
  Added blk-lib.c and blk-barrier.c was renamed to blk-flush.c
  block: remove BLKDEV_IFL_WAIT
  aic7xxx_old: removed unused 'req' variable
  block: remove the BH_Eopnotsupp flag
  block: remove the BLKDEV_IFL_BARRIER flag
  block: remove the WRITE_BARRIER flag
  swap: do not send discards as barriers
  fat: do not send discards as barriers
  ext4: do not send discards as barriers
  jbd2: replace barriers with explicit flush / FUA usage
  jbd2: Modify ASYNC_COMMIT code to not rely on queue draining on barrier
  jbd: replace barriers with explicit flush / FUA usage
  nilfs2: replace barriers with explicit flush / FUA usage
  reiserfs: replace barriers with explicit flush / FUA usage
  gfs2: replace barriers with explicit flush / FUA usage
  btrfs: replace barriers with explicit flush / FUA usage
  xfs: replace barriers with explicit flush / FUA usage
  block: pass gfp_mask and flags to sb_issue_discard
  dm: convey that all flushes are processed as empty
  ...
</content>
</entry>
<entry>
<title>Merge branch 'for-2.6.37/drivers' of git://git.kernel.dk/linux-2.6-block</title>
<updated>2010-10-23T00:03:12Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-10-23T00:03:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8abfc6e7a45eb74e51904bbae676fae008b11366'/>
<id>urn:sha1:8abfc6e7a45eb74e51904bbae676fae008b11366</id>
<content type='text'>
* 'for-2.6.37/drivers' of git://git.kernel.dk/linux-2.6-block: (95 commits)
  cciss: fix PCI IDs for new Smart Array controllers
  drbd: add race-breaker to drbd_go_diskless
  drbd: use dynamic_dev_dbg to optionally log uuid changes
  dynamic_debug.h: Fix dynamic_dev_dbg() macro if CONFIG_DYNAMIC_DEBUG not set
  drbd: cleanup: change "&lt;= 0" to "== 0"
  drbd: relax the grace period of the md_sync timer again
  drbd: add some more explicit drbd_md_sync
  drbd: drop wrong debug asserts, fix recently introduced race
  drbd: cleanup useless leftover warn/error printk's
  drbd: add explicit drbd_md_sync to drbd_resync_finished
  drbd: Do not log an ASSERT for P_OV_REQUEST packets while C_CONNECTED
  drbd: fix for possible deadlock on IO error during resync
  drbd: fix unlikely access after free and list corruption
  drbd: fix for spurious fullsync (uuids rotated too fast)
  drbd: allow for explicit resync-finished notifications
  drbd: preparation commit, using full state in receive_state()
  drbd: drbd_send_ack_dp must not rely on header information
  drbd: Fix regression in recv_bm_rle_bits (compressed bitmap)
  drbd: Fixed a stupid copy and paste error
  drbd: Allow larger values for c-fill-target.
  ...

Fix up trivial conflict in drivers/block/ataflop.c due to BKL removal
</content>
</entry>
<entry>
<title>block: autoconvert trivial BKL users to private mutex</title>
<updated>2010-10-05T13:01:10Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2010-06-02T12:28:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2a48fc0ab24241755dc93bfd4f01d68efab47f5a'/>
<id>urn:sha1:2a48fc0ab24241755dc93bfd4f01d68efab47f5a</id>
<content type='text'>
The block device drivers have all gained new lock_kernel
calls from a recent pushdown, and some of the drivers
were already using the BKL before.

This turns the BKL into a set of per-driver mutexes.
Still need to check whether this is safe to do.

file=$1
name=$2
if grep -q lock_kernel ${file} ; then
    if grep -q 'include.*linux.mutex.h' ${file} ; then
            sed -i '/include.*&lt;linux\/smp_lock.h&gt;/d' ${file}
    else
            sed -i 's/include.*&lt;linux\/smp_lock.h&gt;.*$/include &lt;linux\/mutex.h&gt;/g' ${file}
    fi
    sed -i ${file} \
        -e "/^#include.*linux.mutex.h/,$ {
                1,/^\(static\|int\|long\)/ {
                     /^\(static\|int\|long\)/istatic DEFINE_MUTEX(${name}_mutex);

} }"  \
    -e "s/\(un\)*lock_kernel\&gt;[ ]*()/mutex_\1lock(\&amp;${name}_mutex)/g" \
    -e '/[      ]*cycle_kernel_lock();/d'
else
    sed -i -e '/include.*\&lt;smp_lock.h\&gt;/d' ${file}  \
                -e '/cycle_kernel_lock()/d'
fi

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
</feed>
