<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/fs, branch v4.4.16</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>ovl: verify upper dentry before unlink and rename</title>
<updated>2016-07-27T16:47:40+00:00</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@redhat.com</email>
</author>
<published>2016-03-21T16:31:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=dbf72a4d4531e7e5fb28e76d902d66f05c1bfe12'/>
<id>dbf72a4d4531e7e5fb28e76d902d66f05c1bfe12</id>
<content type='text'>
commit 11f3710417d026ea2f4fcf362d866342c5274185 upstream.

Unlink and rename in overlayfs checked the upper dentry for staleness by
verifying upper-&gt;d_parent against upperdir.  However the dentry can go
stale also by being unhashed, for example.

Expand the verification to actually look up the name again (under parent
lock) and check if it matches the upper dentry.  This matches what the VFS
does before passing the dentry to filesytem's unlink/rename methods, which
excludes any inconsistency caused by overlayfs.

Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 11f3710417d026ea2f4fcf362d866342c5274185 upstream.

Unlink and rename in overlayfs checked the upper dentry for staleness by
verifying upper-&gt;d_parent against upperdir.  However the dentry can go
stale also by being unhashed, for example.

Expand the verification to actually look up the name again (under parent
lock) and check if it matches the upper dentry.  This matches what the VFS
does before passing the dentry to filesytem's unlink/rename methods, which
excludes any inconsistency caused by overlayfs.

Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>File names with trailing period or space need special case conversion</title>
<updated>2016-07-27T16:47:39+00:00</updated>
<author>
<name>Steve French</name>
<email>smfrench@gmail.com</email>
</author>
<published>2016-06-23T02:07:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=12f2f04e0376453bab82a2d6aa51cb94f4f65d33'/>
<id>12f2f04e0376453bab82a2d6aa51cb94f4f65d33</id>
<content type='text'>
commit 45e8a2583d97ca758a55c608f78c4cef562644d1 upstream.

POSIX allows files with trailing spaces or a trailing period but
SMB3 does not, so convert these using the normal Services For Mac
mapping as we do for other reserved characters such as
	: &lt; &gt; | ? *
This is similar to what Macs do for the same problem over SMB3.

Signed-off-by: Steve French &lt;steve.french@primarydata.com&gt;
Acked-by: Pavel Shilovsky &lt;pshilovsky@samba.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 45e8a2583d97ca758a55c608f78c4cef562644d1 upstream.

POSIX allows files with trailing spaces or a trailing period but
SMB3 does not, so convert these using the normal Services For Mac
mapping as we do for other reserved characters such as
	: &lt; &gt; | ? *
This is similar to what Macs do for the same problem over SMB3.

Signed-off-by: Steve French &lt;steve.french@primarydata.com&gt;
Acked-by: Pavel Shilovsky &lt;pshilovsky@samba.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>cifs: dynamic allocation of ntlmssp blob</title>
<updated>2016-07-27T16:47:39+00:00</updated>
<author>
<name>Jerome Marchand</name>
<email>jmarchan@redhat.com</email>
</author>
<published>2016-05-26T09:52:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1422b6b926f3634cddf449d65ce976f397726c63'/>
<id>1422b6b926f3634cddf449d65ce976f397726c63</id>
<content type='text'>
commit b8da344b74c822e966c6d19d6b2321efe82c5d97 upstream.

In sess_auth_rawntlmssp_authenticate(), the ntlmssp blob is allocated
statically and its size is an "empirical" 5*sizeof(struct
_AUTHENTICATE_MESSAGE) (320B on x86_64). I don't know where this value
comes from or if it was ever appropriate, but it is currently
insufficient: the user and domain name in UTF16 could take 1kB by
themselves. Because of that, build_ntlmssp_auth_blob() might corrupt
memory (out-of-bounds write). The size of ntlmssp_blob in
SMB2_sess_setup() is too small too (sizeof(struct _NEGOTIATE_MESSAGE)
+ 500).

This patch allocates the blob dynamically in
build_ntlmssp_auth_blob().

Signed-off-by: Jerome Marchand &lt;jmarchan@redhat.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit b8da344b74c822e966c6d19d6b2321efe82c5d97 upstream.

In sess_auth_rawntlmssp_authenticate(), the ntlmssp blob is allocated
statically and its size is an "empirical" 5*sizeof(struct
_AUTHENTICATE_MESSAGE) (320B on x86_64). I don't know where this value
comes from or if it was ever appropriate, but it is currently
insufficient: the user and domain name in UTF16 could take 1kB by
themselves. Because of that, build_ntlmssp_auth_blob() might corrupt
memory (out-of-bounds write). The size of ntlmssp_blob in
SMB2_sess_setup() is too small too (sizeof(struct _NEGOTIATE_MESSAGE)
+ 500).

This patch allocates the blob dynamically in
build_ntlmssp_auth_blob().

Signed-off-by: Jerome Marchand &lt;jmarchan@redhat.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Fix reconnect to not defer smb3 session reconnect long after socket reconnect</title>
<updated>2016-07-27T16:47:39+00:00</updated>
<author>
<name>Steve French</name>
<email>smfrench@gmail.com</email>
</author>
<published>2016-06-23T01:12:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4ce7aa4e44d88ce64ea8ae2337b8910f3670b0ba'/>
<id>4ce7aa4e44d88ce64ea8ae2337b8910f3670b0ba</id>
<content type='text'>
commit 4fcd1813e6404dd4420c7d12fb483f9320f0bf93 upstream.

Azure server blocks clients that open a socket and don't do anything on it.
In our reconnect scenarios, we can reconnect the tcp session and
detect the socket is available but we defer the negprot and SMB3 session
setup and tree connect reconnection until the next i/o is requested, but
this looks suspicous to some servers who expect SMB3 negprog and session
setup soon after a socket is created.

In the echo thread, reconnect SMB3 sessions and tree connections
that are disconnected.  A later patch will replay persistent (and
resilient) handle opens.

Signed-off-by: Steve French &lt;steve.french@primarydata.com&gt;
Acked-by: Pavel Shilovsky &lt;pshilovsky@samba.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 4fcd1813e6404dd4420c7d12fb483f9320f0bf93 upstream.

Azure server blocks clients that open a socket and don't do anything on it.
In our reconnect scenarios, we can reconnect the tcp session and
detect the socket is available but we defer the negprot and SMB3 session
setup and tree connect reconnection until the next i/o is requested, but
this looks suspicous to some servers who expect SMB3 negprog and session
setup soon after a socket is created.

In the echo thread, reconnect SMB3 sessions and tree connections
that are disconnected.  A later patch will replay persistent (and
resilient) handle opens.

Signed-off-by: Steve French &lt;steve.french@primarydata.com&gt;
Acked-by: Pavel Shilovsky &lt;pshilovsky@samba.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ovl: verify upper dentry in ovl_remove_and_whiteout()</title>
<updated>2016-07-27T16:47:39+00:00</updated>
<author>
<name>Maxim Patlasov</name>
<email>mpatlasov@virtuozzo.com</email>
</author>
<published>2016-07-22T01:24:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=cf2a2c6de0516f595825c9c46eb8ebc12a48dd31'/>
<id>cf2a2c6de0516f595825c9c46eb8ebc12a48dd31</id>
<content type='text'>
commit cfc9fde0b07c3b44b570057c5f93dda59dca1c94 upstream.

The upper dentry may become stale before we call ovl_lock_rename_workdir.
For example, someone could (mistakenly or maliciously) manually unlink(2)
it directly from upperdir.

To ensure it is not stale, let's lookup it after ovl_lock_rename_workdir
and and check if it matches the upper dentry.

Essentially, it is the same problem and similar solution as in
commit 11f3710417d0 ("ovl: verify upper dentry before unlink and rename").

Signed-off-by: Maxim Patlasov &lt;mpatlasov@virtuozzo.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit cfc9fde0b07c3b44b570057c5f93dda59dca1c94 upstream.

The upper dentry may become stale before we call ovl_lock_rename_workdir.
For example, someone could (mistakenly or maliciously) manually unlink(2)
it directly from upperdir.

To ensure it is not stale, let's lookup it after ovl_lock_rename_workdir
and and check if it matches the upper dentry.

Essentially, it is the same problem and similar solution as in
commit 11f3710417d0 ("ovl: verify upper dentry before unlink and rename").

Signed-off-by: Maxim Patlasov &lt;mpatlasov@virtuozzo.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ovl: Copy up underlying inode's -&gt;i_mode to overlay inode</title>
<updated>2016-07-27T16:47:39+00:00</updated>
<author>
<name>Vivek Goyal</name>
<email>vgoyal@redhat.com</email>
</author>
<published>2016-07-01T20:34:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c12dada5f28a4894b81df2666c060f5cecc02cf9'/>
<id>c12dada5f28a4894b81df2666c060f5cecc02cf9</id>
<content type='text'>
commit 07a2daab49c549a37b5b744cbebb6e3f445f12bc upstream.

Right now when a new overlay inode is created, we initialize overlay
inode's -&gt;i_mode from underlying inode -&gt;i_mode but we retain only
file type bits (S_IFMT) and discard permission bits.

This patch changes it and retains permission bits too. This should allow
overlay to do permission checks on overlay inode itself in task context.

[SzM] It also fixes clearing suid/sgid bits on write.

Signed-off-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Reported-by: Eryu Guan &lt;eguan@redhat.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Fixes: 4bacc9c9234c ("overlayfs: Make f_path always point to the overlay and f_inode to the underlay")
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 07a2daab49c549a37b5b744cbebb6e3f445f12bc upstream.

Right now when a new overlay inode is created, we initialize overlay
inode's -&gt;i_mode from underlying inode -&gt;i_mode but we retain only
file type bits (S_IFMT) and discard permission bits.

This patch changes it and retains permission bits too. This should allow
overlay to do permission checks on overlay inode itself in task context.

[SzM] It also fixes clearing suid/sgid bits on write.

Signed-off-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Reported-by: Eryu Guan &lt;eguan@redhat.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Fixes: 4bacc9c9234c ("overlayfs: Make f_path always point to the overlay and f_inode to the underlay")
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>btrfs: account for non-CoW'd blocks in btrfs_abort_transaction</title>
<updated>2016-07-27T16:47:33+00:00</updated>
<author>
<name>Jeff Mahoney</name>
<email>jeffm@suse.com</email>
</author>
<published>2016-06-08T04:36:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=13226e1ed87182883f877f6021c2b4a2f019c363'/>
<id>13226e1ed87182883f877f6021c2b4a2f019c363</id>
<content type='text'>
commit 64c12921e11b3a0c10d088606e328c58e29274d8 upstream.

The test for !trans-&gt;blocks_used in btrfs_abort_transaction is
insufficient to determine whether it's safe to drop the transaction
handle on the floor.  btrfs_cow_block, informed by should_cow_block,
can return blocks that have already been CoW'd in the current
transaction.  trans-&gt;blocks_used is only incremented for new block
allocations. If an operation overlaps the blocks in the current
transaction entirely and must abort the transaction, we'll happily
let it clean up the trans handle even though it may have modified
the blocks and will commit an incomplete operation.

In the long-term, I'd like to do closer tracking of when the fs
is actually modified so we can still recover as gracefully as possible,
but that approach will need some discussion.  In the short term,
since this is the only code using trans-&gt;blocks_used, let's just
switch it to a bool indicating whether any blocks were used and set
it when should_cow_block returns false.

Signed-off-by: Jeff Mahoney &lt;jeffm@suse.com&gt;
Reviewed-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 64c12921e11b3a0c10d088606e328c58e29274d8 upstream.

The test for !trans-&gt;blocks_used in btrfs_abort_transaction is
insufficient to determine whether it's safe to drop the transaction
handle on the floor.  btrfs_cow_block, informed by should_cow_block,
can return blocks that have already been CoW'd in the current
transaction.  trans-&gt;blocks_used is only incremented for new block
allocations. If an operation overlaps the blocks in the current
transaction entirely and must abort the transaction, we'll happily
let it clean up the trans handle even though it may have modified
the blocks and will commit an incomplete operation.

In the long-term, I'd like to do closer tracking of when the fs
is actually modified so we can still recover as gracefully as possible,
but that approach will need some discussion.  In the short term,
since this is the only code using trans-&gt;blocks_used, let's just
switch it to a bool indicating whether any blocks were used and set
it when should_cow_block returns false.

Signed-off-by: Jeff Mahoney &lt;jeffm@suse.com&gt;
Reviewed-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>UBIFS: Implement -&gt;migratepage()</title>
<updated>2016-07-27T16:47:31+00:00</updated>
<author>
<name>Kirill A. Shutemov</name>
<email>kirill.shutemov@linux.intel.com</email>
</author>
<published>2016-06-16T21:26:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1e1f4ff765cb0cd011f30ed11a4ef18903329013'/>
<id>1e1f4ff765cb0cd011f30ed11a4ef18903329013</id>
<content type='text'>
commit 4ac1c17b2044a1b4b2fbed74451947e905fc2992 upstream.

During page migrations UBIFS might get confused
and the following assert triggers:
[  213.480000] UBIFS assert failed in ubifs_set_page_dirty at 1451 (pid 436)
[  213.490000] CPU: 0 PID: 436 Comm: drm-stress-test Not tainted 4.4.4-00176-geaa802524636-dirty #1008
[  213.490000] Hardware name: Allwinner sun4i/sun5i Families
[  213.490000] [&lt;c0015e70&gt;] (unwind_backtrace) from [&lt;c0012cdc&gt;] (show_stack+0x10/0x14)
[  213.490000] [&lt;c0012cdc&gt;] (show_stack) from [&lt;c02ad834&gt;] (dump_stack+0x8c/0xa0)
[  213.490000] [&lt;c02ad834&gt;] (dump_stack) from [&lt;c0236ee8&gt;] (ubifs_set_page_dirty+0x44/0x50)
[  213.490000] [&lt;c0236ee8&gt;] (ubifs_set_page_dirty) from [&lt;c00fa0bc&gt;] (try_to_unmap_one+0x10c/0x3a8)
[  213.490000] [&lt;c00fa0bc&gt;] (try_to_unmap_one) from [&lt;c00fadb4&gt;] (rmap_walk+0xb4/0x290)
[  213.490000] [&lt;c00fadb4&gt;] (rmap_walk) from [&lt;c00fb1bc&gt;] (try_to_unmap+0x64/0x80)
[  213.490000] [&lt;c00fb1bc&gt;] (try_to_unmap) from [&lt;c010dc28&gt;] (migrate_pages+0x328/0x7a0)
[  213.490000] [&lt;c010dc28&gt;] (migrate_pages) from [&lt;c00d0cb0&gt;] (alloc_contig_range+0x168/0x2f4)
[  213.490000] [&lt;c00d0cb0&gt;] (alloc_contig_range) from [&lt;c010ec00&gt;] (cma_alloc+0x170/0x2c0)
[  213.490000] [&lt;c010ec00&gt;] (cma_alloc) from [&lt;c001a958&gt;] (__alloc_from_contiguous+0x38/0xd8)
[  213.490000] [&lt;c001a958&gt;] (__alloc_from_contiguous) from [&lt;c001ad44&gt;] (__dma_alloc+0x23c/0x274)
[  213.490000] [&lt;c001ad44&gt;] (__dma_alloc) from [&lt;c001ae08&gt;] (arm_dma_alloc+0x54/0x5c)
[  213.490000] [&lt;c001ae08&gt;] (arm_dma_alloc) from [&lt;c035cecc&gt;] (drm_gem_cma_create+0xb8/0xf0)
[  213.490000] [&lt;c035cecc&gt;] (drm_gem_cma_create) from [&lt;c035cf20&gt;] (drm_gem_cma_create_with_handle+0x1c/0xe8)
[  213.490000] [&lt;c035cf20&gt;] (drm_gem_cma_create_with_handle) from [&lt;c035d088&gt;] (drm_gem_cma_dumb_create+0x3c/0x48)
[  213.490000] [&lt;c035d088&gt;] (drm_gem_cma_dumb_create) from [&lt;c0341ed8&gt;] (drm_ioctl+0x12c/0x444)
[  213.490000] [&lt;c0341ed8&gt;] (drm_ioctl) from [&lt;c0121adc&gt;] (do_vfs_ioctl+0x3f4/0x614)
[  213.490000] [&lt;c0121adc&gt;] (do_vfs_ioctl) from [&lt;c0121d30&gt;] (SyS_ioctl+0x34/0x5c)
[  213.490000] [&lt;c0121d30&gt;] (SyS_ioctl) from [&lt;c000f2c0&gt;] (ret_fast_syscall+0x0/0x34)

UBIFS is using PagePrivate() which can have different meanings across
filesystems. Therefore the generic page migration code cannot handle this
case correctly.
We have to implement our own migration function which basically does a
plain copy but also duplicates the page private flag.
UBIFS is not a block device filesystem and cannot use buffer_migrate_page().

Signed-off-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
[rw: Massaged changelog, build fixes, etc...]
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 4ac1c17b2044a1b4b2fbed74451947e905fc2992 upstream.

During page migrations UBIFS might get confused
and the following assert triggers:
[  213.480000] UBIFS assert failed in ubifs_set_page_dirty at 1451 (pid 436)
[  213.490000] CPU: 0 PID: 436 Comm: drm-stress-test Not tainted 4.4.4-00176-geaa802524636-dirty #1008
[  213.490000] Hardware name: Allwinner sun4i/sun5i Families
[  213.490000] [&lt;c0015e70&gt;] (unwind_backtrace) from [&lt;c0012cdc&gt;] (show_stack+0x10/0x14)
[  213.490000] [&lt;c0012cdc&gt;] (show_stack) from [&lt;c02ad834&gt;] (dump_stack+0x8c/0xa0)
[  213.490000] [&lt;c02ad834&gt;] (dump_stack) from [&lt;c0236ee8&gt;] (ubifs_set_page_dirty+0x44/0x50)
[  213.490000] [&lt;c0236ee8&gt;] (ubifs_set_page_dirty) from [&lt;c00fa0bc&gt;] (try_to_unmap_one+0x10c/0x3a8)
[  213.490000] [&lt;c00fa0bc&gt;] (try_to_unmap_one) from [&lt;c00fadb4&gt;] (rmap_walk+0xb4/0x290)
[  213.490000] [&lt;c00fadb4&gt;] (rmap_walk) from [&lt;c00fb1bc&gt;] (try_to_unmap+0x64/0x80)
[  213.490000] [&lt;c00fb1bc&gt;] (try_to_unmap) from [&lt;c010dc28&gt;] (migrate_pages+0x328/0x7a0)
[  213.490000] [&lt;c010dc28&gt;] (migrate_pages) from [&lt;c00d0cb0&gt;] (alloc_contig_range+0x168/0x2f4)
[  213.490000] [&lt;c00d0cb0&gt;] (alloc_contig_range) from [&lt;c010ec00&gt;] (cma_alloc+0x170/0x2c0)
[  213.490000] [&lt;c010ec00&gt;] (cma_alloc) from [&lt;c001a958&gt;] (__alloc_from_contiguous+0x38/0xd8)
[  213.490000] [&lt;c001a958&gt;] (__alloc_from_contiguous) from [&lt;c001ad44&gt;] (__dma_alloc+0x23c/0x274)
[  213.490000] [&lt;c001ad44&gt;] (__dma_alloc) from [&lt;c001ae08&gt;] (arm_dma_alloc+0x54/0x5c)
[  213.490000] [&lt;c001ae08&gt;] (arm_dma_alloc) from [&lt;c035cecc&gt;] (drm_gem_cma_create+0xb8/0xf0)
[  213.490000] [&lt;c035cecc&gt;] (drm_gem_cma_create) from [&lt;c035cf20&gt;] (drm_gem_cma_create_with_handle+0x1c/0xe8)
[  213.490000] [&lt;c035cf20&gt;] (drm_gem_cma_create_with_handle) from [&lt;c035d088&gt;] (drm_gem_cma_dumb_create+0x3c/0x48)
[  213.490000] [&lt;c035d088&gt;] (drm_gem_cma_dumb_create) from [&lt;c0341ed8&gt;] (drm_ioctl+0x12c/0x444)
[  213.490000] [&lt;c0341ed8&gt;] (drm_ioctl) from [&lt;c0121adc&gt;] (do_vfs_ioctl+0x3f4/0x614)
[  213.490000] [&lt;c0121adc&gt;] (do_vfs_ioctl) from [&lt;c0121d30&gt;] (SyS_ioctl+0x34/0x5c)
[  213.490000] [&lt;c0121d30&gt;] (SyS_ioctl) from [&lt;c000f2c0&gt;] (ret_fast_syscall+0x0/0x34)

UBIFS is using PagePrivate() which can have different meanings across
filesystems. Therefore the generic page migration code cannot handle this
case correctly.
We have to implement our own migration function which basically does a
plain copy but also duplicates the page private flag.
UBIFS is not a block device filesystem and cannot use buffer_migrate_page().

Signed-off-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
[rw: Massaged changelog, build fixes, etc...]
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>NFS: Fix another OPEN_DOWNGRADE bug</title>
<updated>2016-07-27T16:47:30+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2016-06-25T23:19:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b5d4a793312969e4dcb0156d4a29bb5f2f5c15f0'/>
<id>b5d4a793312969e4dcb0156d4a29bb5f2f5c15f0</id>
<content type='text'>
commit e547f2628327fec6afd2e03b46f113f614cca05b upstream.

Olga Kornievskaia reports that the following test fails to trigger
an OPEN_DOWNGRADE on the wire, and only triggers the final CLOSE.

	fd0 = open(foo, RDRW)   -- should be open on the wire for "both"
	fd1 = open(foo, RDONLY)  -- should be open on the wire for "read"
	close(fd0) -- should trigger an open_downgrade
	read(fd1)
	close(fd1)

The issue is that we're missing a check for whether or not the current
state transitioned from an O_RDWR state as opposed to having transitioned
from a combination of O_RDONLY and O_WRONLY.

Reported-by: Olga Kornievskaia &lt;aglo@umich.edu&gt;
Fixes: cd9288ffaea4 ("NFSv4: Fix another bug in the close/open_downgrade code")
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit e547f2628327fec6afd2e03b46f113f614cca05b upstream.

Olga Kornievskaia reports that the following test fails to trigger
an OPEN_DOWNGRADE on the wire, and only triggers the final CLOSE.

	fd0 = open(foo, RDRW)   -- should be open on the wire for "both"
	fd1 = open(foo, RDONLY)  -- should be open on the wire for "read"
	close(fd0) -- should trigger an open_downgrade
	read(fd1)
	close(fd1)

The issue is that we're missing a check for whether or not the current
state transitioned from an O_RDWR state as opposed to having transitioned
from a combination of O_RDONLY and O_WRONLY.

Reported-by: Olga Kornievskaia &lt;aglo@umich.edu&gt;
Fixes: cd9288ffaea4 ("NFSv4: Fix another bug in the close/open_downgrade code")
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>make nfs_atomic_open() call d_drop() on all -&gt;open_context() errors.</title>
<updated>2016-07-27T16:47:30+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@ZenIV.linux.org.uk</email>
</author>
<published>2016-06-20T17:14:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=44d86dbf9af1f5d328057eb1137265231da17540'/>
<id>44d86dbf9af1f5d328057eb1137265231da17540</id>
<content type='text'>
commit d20cb71dbf3487f24549ede1a8e2d67579b4632e upstream.

In "NFSv4: Move dentry instantiation into the NFSv4-specific atomic open code"
unconditional d_drop() after the -&gt;open_context() had been removed.  It had
been correct for success cases (there -&gt;open_context() itself had been doing
dcache manipulations), but not for error ones.  Only one of those (ENOENT)
got a compensatory d_drop() added in that commit, but in fact it should've
been done for all errors.  As it is, the case of O_CREAT non-exclusive open
on a hashed negative dentry racing with e.g. symlink creation from another
client ended up with -&gt;open_context() getting an error and proceeding to
call nfs_lookup().  On a hashed dentry, which would've instantly triggered
BUG_ON() in d_materialise_unique() (or, these days, its equivalent in
d_splice_alias()).

Tested-by: Oleg Drokin &lt;green@linuxhacker.ru&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit d20cb71dbf3487f24549ede1a8e2d67579b4632e upstream.

In "NFSv4: Move dentry instantiation into the NFSv4-specific atomic open code"
unconditional d_drop() after the -&gt;open_context() had been removed.  It had
been correct for success cases (there -&gt;open_context() itself had been doing
dcache manipulations), but not for error ones.  Only one of those (ENOENT)
got a compensatory d_drop() added in that commit, but in fact it should've
been done for all errors.  As it is, the case of O_CREAT non-exclusive open
on a hashed negative dentry racing with e.g. symlink creation from another
client ended up with -&gt;open_context() getting an error and proceeding to
call nfs_lookup().  On a hashed dentry, which would've instantly triggered
BUG_ON() in d_materialise_unique() (or, these days, its equivalent in
d_splice_alias()).

Tested-by: Oleg Drokin &lt;green@linuxhacker.ru&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
</feed>
