<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs, branch v4.4</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=v4.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-12-30T01:45:49Z</updated>
<entry>
<title>ocfs2/dlm: clear migration_pending when migration target goes down</title>
<updated>2015-12-30T01:45:49Z</updated>
<author>
<name>xuejiufei</name>
<email>xuejiufei@huawei.com</email>
</author>
<published>2015-12-29T22:54:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cc28d6d80f6ab494b10f0e2ec949eacd610f66e3'/>
<id>urn:sha1:cc28d6d80f6ab494b10f0e2ec949eacd610f66e3</id>
<content type='text'>
We have found a BUG on res-&gt;migration_pending when migrating lock
resources.  The situation is as follows.

dlm_mark_lockres_migration
  res-&gt;migration_pending = 1;
  __dlm_lockres_reserve_ast
  dlm_lockres_release_ast returns with res-&gt;migration_pending remains
      because other threads reserve asts
  wait dlm_migration_can_proceed returns 1
  &gt;&gt;&gt;&gt;&gt;&gt;&gt; o2hb found that target goes down and remove target
          from domain_map
  dlm_migration_can_proceed returns 1
  dlm_mark_lockres_migrating returns -ESHOTDOWN with
      res-&gt;migration_pending still remains.

When reentering dlm_mark_lockres_migrating(), it will trigger the BUG_ON
with res-&gt;migration_pending.  So clear migration_pending when target is
down.

Signed-off-by: Jiufei Xue &lt;xuejiufei@huawei.com&gt;
Reviewed-by: Joseph Qi &lt;joseph.qi@huawei.com&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.de&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Cc: Junxiao Bi &lt;junxiao.bi@oracle.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>ocfs2: fix flock panic issue</title>
<updated>2015-12-30T01:45:49Z</updated>
<author>
<name>Junxiao Bi</name>
<email>junxiao.bi@oracle.com</email>
</author>
<published>2015-12-29T22:54:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b5a8bc338e68d5f6f753e14ae59b30e75a5ffdde'/>
<id>urn:sha1:b5a8bc338e68d5f6f753e14ae59b30e75a5ffdde</id>
<content type='text'>
Commit 4f6563677ae8 ("Move locks API users to locks_lock_inode_wait()")
move flock/posix lock indentify code to locks_lock_inode_wait(), but
missed to set fl_flags to FL_FLOCK which caused the following kernel
panic on 4.4.0_rc5.

  kernel BUG at fs/locks.c:1895!
  invalid opcode: 0000 [#1] SMP
  Modules linked in: ocfs2(O) ocfs2_dlmfs(O) ocfs2_stack_o2cb(O) ocfs2_dlm(O) ocfs2_nodemanager(O) ocfs2_stackglue(O) iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi xen_kbdfront xen_netfront xen_fbfront xen_blkfront
  CPU: 0 PID: 20268 Comm: flock_unit_test Tainted: G           O    4.4.0-rc5-next-20151217 #1
  Hardware name: Xen HVM domU, BIOS 4.3.1OVM 05/14/2014
  task: ffff88007b3672c0 ti: ffff880028b58000 task.ti: ffff880028b58000
  RIP: locks_lock_inode_wait+0x2e/0x160
  Call Trace:
    ocfs2_do_flock+0x91/0x160 [ocfs2]
    ocfs2_flock+0x76/0xd0 [ocfs2]
    SyS_flock+0x10f/0x1a0
    entry_SYSCALL_64_fastpath+0x12/0x71
  Code: e5 41 57 41 56 49 89 fe 41 55 41 54 53 48 89 f3 48 81 ec 88 00 00 00 8b 46 40 83 e0 03 83 f8 01 0f 84 ad 00 00 00 83 f8 02 74 04 &lt;0f&gt; 0b eb fe 4c 8d ad 60 ff ff ff 4c 8d 7b 58 e8 0e 8e 73 00 4d
  RIP  locks_lock_inode_wait+0x2e/0x160
   RSP &lt;ffff880028b5bce8&gt;
  ---[ end trace dfca74ec9b5b274c ]---

Fixes: 4f6563677ae8 ("Move locks API users to locks_lock_inode_wait()")
Signed-off-by: Junxiao Bi &lt;junxiao.bi@oracle.com&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.de&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Cc: Joseph Qi &lt;joseph.qi@huawei.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>ocfs2: fix BUG when calculate new backup super</title>
<updated>2015-12-30T01:45:49Z</updated>
<author>
<name>Joseph Qi</name>
<email>joseph.qi@huawei.com</email>
</author>
<published>2015-12-29T22:54:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5c9ee4cbf2a945271f25b89b137f2c03bbc3be33'/>
<id>urn:sha1:5c9ee4cbf2a945271f25b89b137f2c03bbc3be33</id>
<content type='text'>
When resizing, it firstly extends the last gd.  Once it should backup
super in the gd, it calculates new backup super and update the
corresponding value.

But it currently doesn't consider the situation that the backup super is
already done.  And in this case, it still sets the bit in gd bitmap and
then decrease from bg_free_bits_count, which leads to a corrupted gd and
trigger the BUG in ocfs2_block_group_set_bits:

    BUG_ON(le16_to_cpu(bg-&gt;bg_free_bits_count) &lt; num_bits);

So check whether the backup super is done and then do the updates.

Signed-off-by: Joseph Qi &lt;joseph.qi@huawei.com&gt;
Reviewed-by: Jiufei Xue &lt;xuejiufei@huawei.com&gt;
Reviewed-by: Yiwen Jiang &lt;jiangyiwen@huawei.com&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.de&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Cc: &lt;stable@vger.kernel.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 tag 'nfsd-4.4-1' of git://linux-nfs.org/~bfields/linux</title>
<updated>2015-12-22T23:52:32Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-12-22T23:52:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0bee6ec80b92d853d6cad3c35fb5f1dd2d88b8f8'/>
<id>urn:sha1:0bee6ec80b92d853d6cad3c35fb5f1dd2d88b8f8</id>
<content type='text'>
Pull nfsd fix from Bruce Fields:
 "Just one fix for a NFSv4 callback bug introduced in 4.4"

* tag 'nfsd-4.4-1' of git://linux-nfs.org/~bfields/linux:
  nfsd: don't hold ls_mutex across a layout recall
</content>
</entry>
<entry>
<title>Merge branch 'for-linus-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs</title>
<updated>2015-12-18T23:35:08Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-12-18T23:35:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fc315e3e5c9418df6ce5cee97fd4adcce9dcf24e'/>
<id>urn:sha1:fc315e3e5c9418df6ce5cee97fd4adcce9dcf24e</id>
<content type='text'>
Pull btrfs fixes from Chris Mason:
 "A couple of small fixes"

* 'for-linus-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: check prepare_uptodate_page() error code earlier
  Btrfs: check for empty bitmap list in setup_cluster_bitmaps
  btrfs: fix misleading warning when space cache failed to load
  Btrfs: fix transaction handle leak in balance
  Btrfs: fix unprotected list move from unused_bgs to deleted_bgs list
</content>
</entry>
<entry>
<title>proc: fix -ESRCH error when writing to /proc/$pid/coredump_filter</title>
<updated>2015-12-18T22:25:40Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2015-12-18T22:22:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=41a0c249cb8706a2efa1ab3d59466b23a27d0c8b'/>
<id>urn:sha1:41a0c249cb8706a2efa1ab3d59466b23a27d0c8b</id>
<content type='text'>
Writing to /proc/$pid/coredump_filter always returns -ESRCH because commit
774636e19ed51 ("proc: convert to kstrto*()/kstrto*_from_user()") removed
the setting of ret after the get_proc_task call and incorrectly left it as
-ESRCH.  Instead, return 0 when successful.

Example breakage:

  echo 0 &gt; /proc/self/coredump_filter
  bash: echo: write error: No such process

Fixes: 774636e19ed51 ("proc: convert to kstrto*()/kstrto*_from_user()")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: &lt;stable@vger.kernel.org&gt; [4.3+]
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>nfsd: don't hold ls_mutex across a layout recall</title>
<updated>2015-12-16T16:49:58Z</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@poochiereds.net</email>
</author>
<published>2015-11-29T13:46:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=be20aa00c67102aaa54599518c086a2338b19f4c'/>
<id>urn:sha1:be20aa00c67102aaa54599518c086a2338b19f4c</id>
<content type='text'>
We do need to serialize layout stateid morphing operations, but we
currently hold the ls_mutex across a layout recall which is pretty
ugly. It's also unnecessary -- once we've bumped the seqid and
copied it, we don't need to serialize the rest of the CB_LAYOUTRECALL
vs. anything else. Just drop the mutex once the copy is done.

This was causing a "workqueue leaked lock or atomic" warning and an
occasional deadlock.

There's more work to be done here but this fixes the immediate
regression.

Fixes: cc8a55320b5f "nfsd: serialize layout stateid morphing operations"
Cc: stable@vger.kernel.org
Reported-by: Kinglong Mee &lt;kinglongmee@gmail.com&gt;
Signed-off-by: Jeff Layton &lt;jeff.layton@primarydata.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-chris-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux into for-linus-4.4</title>
<updated>2015-12-15T17:09:59Z</updated>
<author>
<name>Chris Mason</name>
<email>clm@fb.com</email>
</author>
<published>2015-12-15T17:09:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1d3a5a82fe724c53c472a18a31fb0bbf33dfaba2'/>
<id>urn:sha1:1d3a5a82fe724c53c472a18a31fb0bbf33dfaba2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Btrfs: check prepare_uptodate_page() error code earlier</title>
<updated>2015-12-15T17:09:38Z</updated>
<author>
<name>Chris Mason</name>
<email>clm@fb.com</email>
</author>
<published>2015-12-14T23:40:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bb1591b4ea1a1485ebc79be4e4748e94f96c670b'/>
<id>urn:sha1:bb1591b4ea1a1485ebc79be4e4748e94f96c670b</id>
<content type='text'>
prepare_pages() may end up calling prepare_uptodate_page() twice if our
write only spans a single page.  But if the first call returns an error,
our page will be unlocked and its not safe to call it again.

This bug goes all the way back to 2011, and it's not something commonly
hit.

While we're here, add a more explicit check for the page being truncated
away.  The bare lock_page() alone is protected only by good thoughts and
i_mutex, which we're sure to regret eventually.

Reported-by: Dave Jones &lt;dsj@fb.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: check for empty bitmap list in setup_cluster_bitmaps</title>
<updated>2015-12-15T17:09:33Z</updated>
<author>
<name>Chris Mason</name>
<email>clm@fb.com</email>
</author>
<published>2015-12-15T15:15:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1b9b922a3a601b0c99a095ffafed61fcf6ebe0b7'/>
<id>urn:sha1:1b9b922a3a601b0c99a095ffafed61fcf6ebe0b7</id>
<content type='text'>
Dave Jones found a warning from kasan in setup_cluster_bitmaps()

==================================================================
BUG: KASAN: stack-out-of-bounds in setup_cluster_bitmap+0xc4/0x5a0 at
addr ffff88039bef6828
Read of size 8 by task nfsd/1009
page:ffffea000e6fbd80 count:0 mapcount:0 mapping:          (null)
index:0x0
flags: 0x8000000000000000()
page dumped because: kasan: bad access detected
CPU: 1 PID: 1009 Comm: nfsd Tainted: G        W
4.4.0-rc3-backup-debug+ #1
 ffff880065647b50 000000006bb712c2 ffff88039bef6640 ffffffffa680a43e
 0000004559c00000 ffff88039bef66c8 ffffffffa62638d1 ffffffffa61121c0
 ffff8803a5769de8 0000000000000296 ffff8803a5769df0 0000000000046280
Call Trace:
 [&lt;ffffffffa680a43e&gt;] dump_stack+0x4b/0x6d
 [&lt;ffffffffa62638d1&gt;] kasan_report_error+0x501/0x520
 [&lt;ffffffffa61121c0&gt;] ? debug_show_all_locks+0x1e0/0x1e0
 [&lt;ffffffffa6263948&gt;] kasan_report+0x58/0x60
 [&lt;ffffffffa6814b00&gt;] ? rb_last+0x10/0x40
 [&lt;ffffffffa66f8af4&gt;] ? setup_cluster_bitmap+0xc4/0x5a0
 [&lt;ffffffffa6262ead&gt;] __asan_load8+0x5d/0x70
 [&lt;ffffffffa66f8af4&gt;] setup_cluster_bitmap+0xc4/0x5a0
 [&lt;ffffffffa66f675a&gt;] ? setup_cluster_no_bitmap+0x6a/0x400
 [&lt;ffffffffa66fcd16&gt;] btrfs_find_space_cluster+0x4b6/0x640
 [&lt;ffffffffa66fc860&gt;] ? btrfs_alloc_from_cluster+0x4e0/0x4e0
 [&lt;ffffffffa66fc36e&gt;] ? btrfs_return_cluster_to_free_space+0x9e/0xb0
 [&lt;ffffffffa702dc37&gt;] ? _raw_spin_unlock+0x27/0x40
 [&lt;ffffffffa666a1a1&gt;] find_free_extent+0xba1/0x1520

Andrey noticed this was because we were doing list_first_entry on a list
that might be empty.  Rework the tests a bit so we don't do that.

Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
Reprorted-by: Andrey Ryabinin &lt;ryabinin.a.a@gmail.com&gt;
Reported-by:  Dave Jones &lt;dsj@fb.com&gt;
</content>
</entry>
</feed>
