<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers, branch v4.12.9</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.12.9</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.12.9'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2017-08-25T00:15:05+00:00</updated>
<entry>
<title>usb: qmi_wwan: add D-Link DWM-222 device ID</title>
<updated>2017-08-25T00:15:05+00:00</updated>
<author>
<name>Hector Martin</name>
<email>marcan@marcan.st</email>
</author>
<published>2017-08-01T15:45:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3f40666fff9678bb549dbd4653484538a8aa7d9d'/>
<id>urn:sha1:3f40666fff9678bb549dbd4653484538a8aa7d9d</id>
<content type='text'>
commit bed9ff165960921303a100228585f2d1691b42eb upstream.

Signed-off-by: Hector Martin &lt;marcan@marcan.st&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: optimize acpi companion search for usb port devices</title>
<updated>2017-08-25T00:15:05+00:00</updated>
<author>
<name>Mathias Nyman</name>
<email>mathias.nyman@linux.intel.com</email>
</author>
<published>2017-06-02T13:36:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e2322bcce28862537c4c31684a3eeaf5a3e27c20'/>
<id>urn:sha1:e2322bcce28862537c4c31684a3eeaf5a3e27c20</id>
<content type='text'>
commit ed18c5fa945768a9bec994e786edbbbc7695acf6 upstream.

This optimization significantly reduces xhci driver load time.

In ACPI tables the acpi companion port devices are children of
the hub device. The port devices are identified by their port number
returned by the ACPI _ADR method.
_ADR 0 is reserved for the root hub device.

The current implementation to find a acpi companion port device
loops through all acpi port devices under that parent hub, evaluating
their _ADR method each time a new port device is added.

for a xHC controller with 25 ports under its roothub it
will end up invoking ACPI bytecode 625 times before all ports
are ready, making it really slow.

The _ADR values are already read and cached earler. So instead of
running the bytecode again we can check the cached _ADR value first,
and then fall back to the old way.

As one of the more significant changes, the xhci load time on
Intel kabylake reduced by 70%, (28ms) from
initcall xhci_pci_init+0x0/0x49 returned 0 after 39537 usecs
to
initcall xhci_pci_init+0x0/0x49 returned 0 after 11270 usecs

Signed-off-by: Mathias Nyman &lt;mathias.nyman@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>irqchip/atmel-aic: Fix unbalanced refcount in aic_common_rtc_irq_fixup()</title>
<updated>2017-08-25T00:15:04+00:00</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@free-electrons.com</email>
</author>
<published>2017-07-04T09:10:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=399193e8ef2d41a123831ce67561fb5419c85324'/>
<id>urn:sha1:399193e8ef2d41a123831ce67561fb5419c85324</id>
<content type='text'>
commit 277867ade8262583f4280cadbe90e0031a3706a7 upstream.

of_find_compatible_node() is calling of_node_put() on its first argument
thus leading to an unbalanced of_node_get/put() issue if the node has not
been retained before that.

Instead of passing the root node, pass NULL, which does exactly the same:
iterate over all DT nodes, starting from the root node.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Reported-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Fixes: 3d61467f9bab ("irqchip: atmel-aic: Implement RTC irq fixup")
Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>irqchip/atmel-aic: Fix unbalanced of_node_put() in aic_common_irq_fixup()</title>
<updated>2017-08-25T00:15:04+00:00</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@free-electrons.com</email>
</author>
<published>2017-07-04T09:10:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2eceab663b9d04abb10ada7050ac7406b7b40c19'/>
<id>urn:sha1:2eceab663b9d04abb10ada7050ac7406b7b40c19</id>
<content type='text'>
commit 469bcef53c546bb792aa66303933272991b7831d upstream.

aic_common_irq_fixup() is calling twice of_node_put() on the same node
thus leading to an unbalanced refcount on the root node.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Reported-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Fixes: b2f579b58e93 ("irqchip: atmel-aic: Add irq fixup infrastructure")
Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>xen-blkfront: use a right index when checking requests</title>
<updated>2017-08-25T00:15:03+00:00</updated>
<author>
<name>Munehisa Kamata</name>
<email>kamatam@amazon.com</email>
</author>
<published>2017-08-09T22:31:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=33f1d0c79b044ac8d721d24ea0adb4146824d3bf'/>
<id>urn:sha1:33f1d0c79b044ac8d721d24ea0adb4146824d3bf</id>
<content type='text'>
commit b15bd8cb37598afb2963f7eb9e2de468d2d60a2f upstream.

Since commit d05d7f40791c ("Merge branch 'for-4.8/core' of
git://git.kernel.dk/linux-block") and 3fc9d690936f ("Merge branch
'for-4.8/drivers' of git://git.kernel.dk/linux-block"), blkfront_resume()
has been using an index for iterating ring_info to check request when
iterating blk_shadow in an inner loop. This seems to have been
accidentally introduced during the massive rewrite of the block layer
macros in the commits.

This may cause crash like this:

[11798.057074] BUG: unable to handle kernel NULL pointer dereference at 0000000000000048
[11798.058832] IP: [&lt;ffffffff814411fa&gt;] blkfront_resume+0x10a/0x610
....
[11798.061063] Call Trace:
[11798.061063]  [&lt;ffffffff8139ce93&gt;] xenbus_dev_resume+0x53/0x140
[11798.061063]  [&lt;ffffffff8139ce40&gt;] ? xenbus_dev_probe+0x150/0x150
[11798.061063]  [&lt;ffffffff813f359e&gt;] dpm_run_callback+0x3e/0x110
[11798.061063]  [&lt;ffffffff813f3a08&gt;] device_resume+0x88/0x190
[11798.061063]  [&lt;ffffffff813f4cc0&gt;] dpm_resume+0x100/0x2d0
[11798.061063]  [&lt;ffffffff813f5221&gt;] dpm_resume_end+0x11/0x20
[11798.061063]  [&lt;ffffffff813950a8&gt;] do_suspend+0xe8/0x1a0
[11798.061063]  [&lt;ffffffff813954bd&gt;] shutdown_handler+0xfd/0x130
[11798.061063]  [&lt;ffffffff8139aba0&gt;] ? split+0x110/0x110
[11798.061063]  [&lt;ffffffff8139ac26&gt;] xenwatch_thread+0x86/0x120
[11798.061063]  [&lt;ffffffff810b4570&gt;] ? prepare_to_wait_event+0x110/0x110
[11798.061063]  [&lt;ffffffff8108fe57&gt;] kthread+0xd7/0xf0
[11798.061063]  [&lt;ffffffff811da811&gt;] ? kfree+0x121/0x170
[11798.061063]  [&lt;ffffffff8108fd80&gt;] ? kthread_park+0x60/0x60
[11798.061063]  [&lt;ffffffff810863b0&gt;] ?  call_usermodehelper_exec_work+0xb0/0xb0
[11798.061063]  [&lt;ffffffff810864ea&gt;] ?  call_usermodehelper_exec_async+0x13a/0x140
[11798.061063]  [&lt;ffffffff81534a45&gt;] ret_from_fork+0x25/0x30

Use the right index in the inner loop.

Fixes: d05d7f40791c ("Merge branch 'for-4.8/core' of git://git.kernel.dk/linux-block")
Fixes: 3fc9d690936f ("Merge branch 'for-4.8/drivers' of git://git.kernel.dk/linux-block")
Signed-off-by: Munehisa Kamata &lt;kamatam@amazon.com&gt;
Reviewed-by: Thomas Friebel &lt;friebelt@amazon.de&gt;
Reviewed-by: Eduardo Valentin &lt;eduval@amazon.com&gt;
Reviewed-by: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
Cc: Juergen Gross &lt;jgross@suse.com&gt;
Cc: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Reviewed-by: Roger Pau Monne &lt;roger.pau@citrix.com&gt;
Cc: xen-devel@lists.xenproject.org
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>xen: fix bio vec merging</title>
<updated>2017-08-25T00:15:03+00:00</updated>
<author>
<name>Roger Pau Monne</name>
<email>roger.pau@citrix.com</email>
</author>
<published>2017-07-18T14:01:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c1cee6062ac9c375cda25bd2d334d54af4bd4c26'/>
<id>urn:sha1:c1cee6062ac9c375cda25bd2d334d54af4bd4c26</id>
<content type='text'>
commit 462cdace790ac2ed6aad1b19c9c0af0143b6aab0 upstream.

The current test for bio vec merging is not fully accurate and can be
tricked into merging bios when certain grant combinations are used.
The result of these malicious bio merges is a bio that extends past
the memory page used by any of the originating bios.

Take into account the following scenario, where a guest creates two
grant references that point to the same mfn, ie: grant 1 -&gt; mfn A,
grant 2 -&gt; mfn A.

These references are then used in a PV block request, and mapped by
the backend domain, thus obtaining two different pfns that point to
the same mfn, pfn B -&gt; mfn A, pfn C -&gt; mfn A.

If those grants happen to be used in two consecutive sectors of a disk
IO operation becoming two different bios in the backend domain, the
checks in xen_biovec_phys_mergeable will succeed, because bfn1 == bfn2
(they both point to the same mfn). However due to the bio merging,
the backend domain will end up with a bio that expands past mfn A into
mfn A + 1.

Fix this by making sure the check in xen_biovec_phys_mergeable takes
into account the offset and the length of the bio, this basically
replicates whats done in __BIOVEC_PHYS_MERGEABLE using mfns (bus
addresses). While there also remove the usage of
__BIOVEC_PHYS_MERGEABLE, since that's already checked by the callers
of xen_biovec_phys_mergeable.

Reported-by: "Jan H. Schönherr" &lt;jschoenh@amazon.de&gt;
Signed-off-by: Roger Pau Monné &lt;roger.pau@citrix.com&gt;
Reviewed-by: Juergen Gross &lt;jgross@suse.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>MD: not clear -&gt;safemode for external metadata array</title>
<updated>2017-08-25T00:15:02+00:00</updated>
<author>
<name>Shaohua Li</name>
<email>shli@fb.com</email>
</author>
<published>2017-08-12T03:34:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6a280cd12306c86b3c23ebb8df941fae2d6a5707'/>
<id>urn:sha1:6a280cd12306c86b3c23ebb8df941fae2d6a5707</id>
<content type='text'>
commit afc1f55ca44e257f69da8f43e0714a76686ae8d1 upstream.

-&gt;safemode should be triggered by mdadm for external metadaa array, otherwise
array's state confuses mdadm.

Fixes: 33182d15c6bf(md: always clear -&gt;safemode when md_check_recovery gets the mddev lock.)
Cc: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: Shaohua Li &lt;shli@fb.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>md: always clear -&gt;safemode when md_check_recovery gets the mddev lock.</title>
<updated>2017-08-25T00:15:01+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.com</email>
</author>
<published>2017-08-08T06:56:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7987c4066cbb4c178bb7807bfd3441f9e65e8c38'/>
<id>urn:sha1:7987c4066cbb4c178bb7807bfd3441f9e65e8c38</id>
<content type='text'>
commit 33182d15c6bf182f7ae32a66ea4a547d979cd6d7 upstream.

If -&gt;safemode == 1, md_check_recovery() will try to get the mddev lock
and perform various other checks.
If mddev-&gt;in_sync is zero, it will call set_in_sync, and clear
-&gt;safemode.  However if mddev-&gt;in_sync is not zero, -&gt;safemode will not
be cleared.

When md_check_recovery() drops the mddev lock, the thread is woken
up again.  Normally it would just check if there was anything else to
do, find nothing, and go to sleep.  However as -&gt;safemode was not
cleared, it will take the mddev lock again, then wake itself up
when unlocking.

This results in an infinite loop, repeatedly calling
md_check_recovery(), which RCU or the soft-lockup detector
will eventually complain about.

Prior to commit 4ad23a976413 ("MD: use per-cpu counter for
writes_pending"), safemode would only be set to one when the
writes_pending counter reached zero, and would be cleared again
when writes_pending is incremented.  Since that patch, safemode
is set more freely, but is not reliably cleared.

So in md_check_recovery() clear -&gt;safemode before checking -&gt;in_sync.

Fixes: 4ad23a976413 ("MD: use per-cpu counter for writes_pending")
Reported-by: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt;
Reported-by: David R &lt;david@unsolicited.net&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: Shaohua Li &lt;shli@fb.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>md: fix test in md_write_start()</title>
<updated>2017-08-25T00:15:01+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.com</email>
</author>
<published>2017-08-08T06:56:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=febaf83252f2e5c94e396619d904047f1c13d4a1'/>
<id>urn:sha1:febaf83252f2e5c94e396619d904047f1c13d4a1</id>
<content type='text'>
commit 81fe48e9aa00bdd509bd3c37a76d1132da6b9f09 upstream.

md_write_start() needs to clear the in_sync flag is it is set, or if
there might be a race with set_in_sync() such that the later will
set it very soon.  In the later case it is sufficient to take the
spinlock to synchronize with set_in_sync(), and then set the flag
if needed.

The current test is incorrect.
It should be:
  if "flag is set" or "race is possible"

"flag is set" is trivially "mddev-&gt;in_sync".
"race is possible" should be tested by "mddev-&gt;sync_checkers".

If sync_checkers is 0, then there can be no race.  set_in_sync() will
wait in percpu_ref_switch_to_atomic_sync() for an RCU grace period,
and as md_write_start() holds the rcu_read_lock(), set_in_sync() will
be sure ot see the update to writes_pending.

If sync_checkers is &gt; 0, there could be race.  If md_write_start()
happened entirely between
		if (!mddev-&gt;in_sync &amp;&amp;
		    percpu_ref_is_zero(&amp;mddev-&gt;writes_pending)) {
and
			mddev-&gt;in_sync = 1;
in set_in_sync(), then it would not see that is_sync had been set,
and set_in_sync() would not see that writes_pending had been
incremented.

This bug means that in_sync is sometimes not set when it should be.
Consequently there is a small chance that the array will be marked as
"clean" when in fact it is inconsistent.

Fixes: 4ad23a976413 ("MD: use per-cpu counter for writes_pending")
Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: Shaohua Li &lt;shli@fb.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Input: elan_i2c - Add antoher Lenovo ACPI ID for upcoming Lenovo NB</title>
<updated>2017-08-25T00:15:01+00:00</updated>
<author>
<name>KT Liao</name>
<email>kt.liao@emc.com.tw</email>
</author>
<published>2017-08-15T03:11:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5f46f337bdeb3e461d14b8119d12d0d109ab42f4'/>
<id>urn:sha1:5f46f337bdeb3e461d14b8119d12d0d109ab42f4</id>
<content type='text'>
commit 76988690402dde2880bfe06ecccf381d48ba8e1c upstream.

Add 2 new IDs (ELAN0609 and ELAN060B) to the list of ACPI IDs that should
be handled by the driver.

Signed-off-by: KT Liao &lt;kt.liao@emc.com.tw&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
