<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/staging, branch v3.18.100</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v3.18.100</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v3.18.100'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-03-18T10:15:44+00:00</updated>
<entry>
<title>staging: android: ashmem: Fix lockdep issue during llseek</title>
<updated>2018-03-18T10:15:44+00:00</updated>
<author>
<name>Joel Fernandes</name>
<email>joelaf@google.com</email>
</author>
<published>2018-02-16T19:02:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0a40db9bb69656032e48df4b8d611f162bbb91ee'/>
<id>urn:sha1:0a40db9bb69656032e48df4b8d611f162bbb91ee</id>
<content type='text'>
commit cb57469c9573f6018cd1302953dd45d6e05aba7b upstream.

ashmem_mutex create a chain of dependencies like so:

(1)
mmap syscall -&gt;
  mmap_sem -&gt;  (acquired)
  ashmem_mmap
  ashmem_mutex (try to acquire)
  (block)

(2)
llseek syscall -&gt;
  ashmem_llseek -&gt;
  ashmem_mutex -&gt;  (acquired)
  inode_lock -&gt;
  inode-&gt;i_rwsem (try to acquire)
  (block)

(3)
getdents -&gt;
  iterate_dir -&gt;
  inode_lock -&gt;
  inode-&gt;i_rwsem   (acquired)
  copy_to_user -&gt;
  mmap_sem         (try to acquire)

There is a lock ordering created between mmap_sem and inode-&gt;i_rwsem
causing a lockdep splat [2] during a syzcaller test, this patch fixes
the issue by unlocking the mutex earlier. Functionally that's Ok since
we don't need to protect vfs_llseek.

[1] https://patchwork.kernel.org/patch/10185031/
[2] https://lkml.org/lkml/2018/1/10/48

Acked-by: Todd Kjos &lt;tkjos@google.com&gt;
Cc: Arve Hjonnevag &lt;arve@android.com&gt;
Cc: stable@vger.kernel.org
Reported-by: syzbot+8ec30bb7bf1a981a2012@syzkaller.appspotmail.com
Signed-off-by: Joel Fernandes &lt;joelaf@google.com&gt;
Acked-by: Greg Hackmann &lt;ghackmann@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>staging: rtl8188eu: Fix incorrect response to SIOCGIWESSID</title>
<updated>2018-02-07T19:07:56+00:00</updated>
<author>
<name>Larry Finger</name>
<email>Larry.Finger@lwfinger.net</email>
</author>
<published>2017-11-25T19:32:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c478e3e8e93e4339439dc628d3b3ec6c2aba9ae3'/>
<id>urn:sha1:c478e3e8e93e4339439dc628d3b3ec6c2aba9ae3</id>
<content type='text'>
[ Upstream commit b77992d2df9e47144354d1b25328b180afa33442 ]

When not associated with an AP, wifi device drivers should respond to the
SIOCGIWESSID ioctl with a zero-length string for the SSID, which is the
behavior expected by dhcpcd.

Currently, this driver returns an error code (-1) from the ioctl call,
which causes dhcpcd to assume that the device is not a wireless interface
and therefore it fails to work correctly with it thereafter.

This problem was reported and tested at
https://github.com/lwfinger/rtl8188eu/issues/234.

Signed-off-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: android: ashmem: fix a race condition in ASHMEM_SET_SIZE ioctl</title>
<updated>2018-01-17T08:29:31+00:00</updated>
<author>
<name>Viktor Slavkovic</name>
<email>viktors@google.com</email>
</author>
<published>2018-01-08T18:43:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6dc42f889217a0a077bc75c6fa5239ade762fff4'/>
<id>urn:sha1:6dc42f889217a0a077bc75c6fa5239ade762fff4</id>
<content type='text'>
commit 443064cb0b1fb4569fe0a71209da7625129fb760 upstream.

A lock-unlock is missing in ASHMEM_SET_SIZE ioctl which can result in a
race condition when mmap is called. After the !asma-&gt;file check, before
setting asma-&gt;size, asma-&gt;file can be set in mmap. That would result in
having different asma-&gt;size than the mapped memory size. Combined with
ASHMEM_UNPIN ioctl and shrinker invocation, this can result in memory
corruption.

Signed-off-by: Viktor Slavkovic &lt;viktors@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mm: avoid returning VM_FAULT_RETRY from -&gt;page_mkwrite handlers</title>
<updated>2017-12-09T17:29:47+00:00</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2017-02-08T22:30:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ccf653b185f9cb39c403e7b58a9d5ed08d924768'/>
<id>urn:sha1:ccf653b185f9cb39c403e7b58a9d5ed08d924768</id>
<content type='text'>
[ Upstream commit 0911d0041c22922228ca52a977d7b0b0159fee4b ]

Some -&gt;page_mkwrite handlers may return VM_FAULT_RETRY as its return
code (GFS2 or Lustre can definitely do this).  However VM_FAULT_RETRY
from -&gt;page_mkwrite is completely unhandled by the mm code and results
in locking and writeably mapping the page which definitely is not what
the caller wanted.

Fix Lustre and block_page_mkwrite_ret() used by other filesystems
(notably GFS2) to return VM_FAULT_NOPAGE instead which results in
bailing out from the fault code, the CPU then retries the access, and we
fault again effectively doing what the handler wanted.

Link: http://lkml.kernel.org/r/20170203150729.15863-1-jack@suse.cz
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Reported-by: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Reviewed-by: Jinshan Xiong &lt;jinshan.xiong@intel.com&gt;
Cc: Matthew Wilcox &lt;willy@infradead.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: iio: cdc: fix improper return value</title>
<updated>2017-11-30T08:35:55+00:00</updated>
<author>
<name>Pan Bian</name>
<email>bianpan2016@163.com</email>
</author>
<published>2016-12-03T13:44:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=efaa1a4a7250791bde907b73155909026b9e4479'/>
<id>urn:sha1:efaa1a4a7250791bde907b73155909026b9e4479</id>
<content type='text'>
[ Upstream commit 91ca1a8c584f55857b1f6ab20a1d3a1ce7a559bb ]

At the end of function ad7150_write_event_config(), directly returns 0.
As a result, the errors will be ignored by the callers. It may be better
to return variable "ret".

Signed-off-by: Pan Bian &lt;bianpan2016@163.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>iio: iio-trig-periodic-rtc: Free trigger resource correctly</title>
<updated>2017-11-30T08:35:54+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>ben.hutchings@codethink.co.uk</email>
</author>
<published>2017-11-22T17:12:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6812311cfbebb068e70e0a41a3aefbdc0f647f72'/>
<id>urn:sha1:6812311cfbebb068e70e0a41a3aefbdc0f647f72</id>
<content type='text'>
This is based on upstream commit 10e840dfb0b7, which did not touch the
iio-trig-periodic-rtc driver because it has been removed upstream.

The following explanation comes from that commit:

    These stand-alone trigger drivers were using iio_trigger_put()
    where they should have been using iio_trigger_free().  The
    iio_trigger_put() adds a module_put which is bad since they
    never did a module_get.

    In the sysfs driver, module_get/put's are used as triggers are
    added &amp; removed. This extra module_put() occurs on an error path
    in the probe routine (probably rare).

    In the bfin-timer &amp; interrupt trigger drivers, the module resources
    are not explicitly managed, so it's doing a put on something that
    was never get'd.  It occurs on the probe error path and on the
    remove path (not so rare).

    Tested with the sysfs trigger driver.
    The bfin &amp; interrupt drivers were build tested &amp; inspected only.

This was build tested only.

Cc: Alison Schofield &lt;amsfield22@gmail.com&gt;
Cc: Jonathan Cameron &lt;jic23@kernel.org&gt;
Signed-off-by: Ben Hutchings &lt;ben.hutchings@codethink.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: rtl8188eu: fix incorrect ERROR tags from logs</title>
<updated>2017-11-21T08:01:05+00:00</updated>
<author>
<name>Galo Navarro</name>
<email>anglorvaroa@gmail.com</email>
</author>
<published>2017-01-03T22:12:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d3750dd19128e35e01678f7cc94f3298e63e5dbe'/>
<id>urn:sha1:d3750dd19128e35e01678f7cc94f3298e63e5dbe</id>
<content type='text'>
[ Upstream commit 401579c22ccbcb54244494069973e64b1fe980d2 ]

Several lifecycle events in the rtl8188eu driver are logged using the
DBG_88E_LEVEL macro from rtw_debug.h, which is tagged as ERROR
regardless of the actual level.  Below are dmesg excerpts after loading
and unloading the module, the messages are misleading as there was no
error.

    [517434.916239] usbcore: registered new interface driver r8188eu
    [517435.680653] R8188EU: ERROR indicate disassoc
    [517437.122606] R8188EU: ERROR assoc success
    [517797.735611] usbcore: deregistering interface driver r8188eu
    [517797.736069] R8188EU: ERROR indicate disassoc

Remove the ERROR prefix from the logs.  After the patch, logs are:

    [517949.873976] usbcore: registered new interface driver r8188eu
    [517950.592845] R8188EU: indicate disassoc
    [517951.993973] R8188EU: assoc success
    [521778.784448] usbcore: deregistering interface driver r8188eu
    [521778.784838] R8188EU: indicate disassoc

Signed-off-by: Galo Navarro &lt;anglorvaroa@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>iio: trigger: free trigger resource correctly</title>
<updated>2017-11-15T09:04:12+00:00</updated>
<author>
<name>Alison Schofield</name>
<email>amsfield22@gmail.com</email>
</author>
<published>2017-01-20T03:47:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2febf192ed4bb493ea808401e925b683a412521f'/>
<id>urn:sha1:2febf192ed4bb493ea808401e925b683a412521f</id>
<content type='text'>
[ Upstream commit 10e840dfb0b7fc345082dd9e5fff3c1c02e7690e ]

These stand-alone trigger drivers were using iio_trigger_put()
where they should have been using iio_trigger_free().  The
iio_trigger_put() adds a module_put which is bad since they
never did a module_get.

In the sysfs driver, module_get/put's are used as triggers are
added &amp; removed. This extra module_put() occurs on an error path
in the probe routine (probably rare).

In the bfin-timer &amp; interrupt trigger drivers, the module resources
are not explicitly managed, so it's doing a put on something that
was never get'd.  It occurs on the probe error path and on the
remove path (not so rare).

Tested with the sysfs trigger driver.
The bfin &amp; interrupt drivers were build tested &amp; inspected only.

Signed-off-by: Alison Schofield &lt;amsfield22@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: r8712u: Fix Sparse warning in rtl871x_xmit.c</title>
<updated>2017-11-08T09:03:50+00:00</updated>
<author>
<name>Larry Finger</name>
<email>Larry.Finger@lwfinger.net</email>
</author>
<published>2017-02-11T03:30:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f772276045d8f5b706b3d6cc60e86ed0371c1f62'/>
<id>urn:sha1:f772276045d8f5b706b3d6cc60e86ed0371c1f62</id>
<content type='text'>
[ Upstream commit 07222e535831b916221dd2a48a3047ec7e45dc72 ]

Sparse reports the following:
  CHECK   drivers/staging/rtl8712/rtl871x_xmit.c
drivers/staging/rtl8712/rtl871x_xmit.c:350:44: warning: restricted __le32 degrades to integer
drivers/staging/rtl8712/rtl871x_xmit.c:491:23: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8712/rtl871x_xmit.c:491:23:    expected unsigned short [usertype] *fctrl
drivers/staging/rtl8712/rtl871x_xmit.c:491:23:    got restricted __le16 *&lt;noident&gt;
drivers/staging/rtl8712/rtl871x_xmit.c:580:36: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8712/rtl871x_xmit.c:580:36:    expected unsigned short [unsigned] [short] [usertype] &lt;noident&gt;
drivers/staging/rtl8712/rtl871x_xmit.c:580:36:    got restricted __be16 [usertype] &lt;noident&gt;

Signed-off-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: lustre: ptlrpc: skip lock if export failed</title>
<updated>2017-11-08T09:03:50+00:00</updated>
<author>
<name>Alexander Boyko</name>
<email>alexander.boyko@seagate.com</email>
</author>
<published>2017-10-07T22:38:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4220879c089ec493322ef250105ac32bc1b8d9d4'/>
<id>urn:sha1:4220879c089ec493322ef250105ac32bc1b8d9d4</id>
<content type='text'>
[ Upstream commit 4c43c27ddc461d8473cedd70f2549614641dfbc7 ]

This patch resolves IO vs eviction race.
After eviction failed export stayed at stale list,
a client had IO processing and reconnected during it.
A client sent brw rpc with last lock cookie and new connection.
The lock with failed export was found and assert was happened.
 (ost_handler.c:1812:ost_prolong_lock_one())
  ASSERTION( lock-&gt;l_export == opd-&gt;opd_exp ) failed:

 1. Skip the lock at ldlm_handle2lock if lock export failed.
 2. Validation of lock for IO was added at hpreq_check(). The lock
    searching is based on granted interval tree. If server doesn`t
    have a valid lock, it reply to client with ESTALE.

Signed-off-by: Alexander Boyko &lt;alexander.boyko@seagate.com&gt;
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7702
Seagate-bug-id: MRP-2787
Reviewed-on: http://review.whamcloud.com/18120
Reviewed-by: Fan Yong &lt;fan.yong@intel.com&gt;
Reviewed-by: Vitaly Fertman &lt;vitaly.fertman@seagate.com&gt;
Reviewed-by: Oleg Drokin &lt;oleg.drokin@intel.com&gt;
Signed-off-by: James Simmons &lt;jsimmons@infradead.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
