<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git, branch v4.2.3</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>Linux 4.2.3</title>
<updated>2015-10-03T11:52:18+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2015-10-03T11:52:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=fcba09f2b0bf27eeaa1d4d439edb649585f35040'/>
<id>fcba09f2b0bf27eeaa1d4d439edb649585f35040</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>hp-wmi: limit hotkey enable</title>
<updated>2015-10-03T11:51:39+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kvans32@gmail.com</email>
</author>
<published>2015-09-11T15:40:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b2b2c7be0fc8e9b0f6f32215cd23b54b07ec4b31'/>
<id>b2b2c7be0fc8e9b0f6f32215cd23b54b07ec4b31</id>
<content type='text'>
commit 8a1513b49321e503fd6c8b6793e3b1f9a8a3285b upstream.

Do not write initialize magic on systems that do not have
feature query 0xb. Fixes Bug #82451.

Redefine FEATURE_QUERY to align with 0xb and FEATURE2 with 0xd
for code clearity.

Add a new test function, hp_wmi_bios_2008_later() &amp; simplify
hp_wmi_bios_2009_later(), which fixes a bug in cases where
an improper value is returned. Probably also fixes Bug #69131.

Add missing __init tag.

Signed-off-by: Kyle Evans &lt;kvans32@gmail.com&gt;
Signed-off-by: Darren Hart &lt;dvhart@linux.intel.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 8a1513b49321e503fd6c8b6793e3b1f9a8a3285b upstream.

Do not write initialize magic on systems that do not have
feature query 0xb. Fixes Bug #82451.

Redefine FEATURE_QUERY to align with 0xb and FEATURE2 with 0xd
for code clearity.

Add a new test function, hp_wmi_bios_2008_later() &amp; simplify
hp_wmi_bios_2009_later(), which fixes a bug in cases where
an improper value is returned. Probably also fixes Bug #69131.

Add missing __init tag.

Signed-off-by: Kyle Evans &lt;kvans32@gmail.com&gt;
Signed-off-by: Darren Hart &lt;dvhart@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>zram: fix possible use after free in zcomp_create()</title>
<updated>2015-10-03T11:51:39+00:00</updated>
<author>
<name>Luis Henriques</name>
<email>luis.henriques@canonical.com</email>
</author>
<published>2015-09-17T23:01:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6abf903c8eb352a3705353789ac200d188466f16'/>
<id>6abf903c8eb352a3705353789ac200d188466f16</id>
<content type='text'>
commit 3aaf14da807a4e9931a37f21e4251abb8a67021b upstream.

zcomp_create() verifies the success of zcomp_strm_{multi,single}_create()
through comp-&gt;stream, which can potentially be pointing to memory that
was freed if these functions returned an error.

While at it, replace a 'ERR_PTR(-ENOMEM)' by a more generic
'ERR_PTR(error)' as in the future zcomp_strm_{multi,siggle}_create()
could return other error codes.  Function documentation updated
accordingly.

Fixes: beca3ec71fe5 ("zram: add multi stream functionality")
Signed-off-by: Luis Henriques &lt;luis.henriques@canonical.com&gt;
Acked-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;
Acked-by: Minchan Kim &lt;minchan@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;
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 3aaf14da807a4e9931a37f21e4251abb8a67021b upstream.

zcomp_create() verifies the success of zcomp_strm_{multi,single}_create()
through comp-&gt;stream, which can potentially be pointing to memory that
was freed if these functions returned an error.

While at it, replace a 'ERR_PTR(-ENOMEM)' by a more generic
'ERR_PTR(error)' as in the future zcomp_strm_{multi,siggle}_create()
could return other error codes.  Function documentation updated
accordingly.

Fixes: beca3ec71fe5 ("zram: add multi stream functionality")
Signed-off-by: Luis Henriques &lt;luis.henriques@canonical.com&gt;
Acked-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;
Acked-by: Minchan Kim &lt;minchan@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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>net/mlx4_core: Capping number of requested MSIXs to MAX_MSIX</title>
<updated>2015-10-03T11:51:39+00:00</updated>
<author>
<name>Carol L Soto</name>
<email>clsoto@linux.vnet.ibm.com</email>
</author>
<published>2015-08-27T19:43:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=92b52680751f95fa275c5a2dfb274de5c320d358'/>
<id>92b52680751f95fa275c5a2dfb274de5c320d358</id>
<content type='text'>
[ Upstream commit 9293267a3e2a7a2555d8ddc8f9301525e5b03b1b ]

We currently manage IRQs in pool_bm which is a bit field
of MAX_MSIX bits. Thus, allocating more than MAX_MSIX
interrupts can't be managed in pool_bm.
Fixing this by capping number of requested MSIXs to
MAX_MSIX.

Signed-off-by: Matan Barak &lt;matanb@mellanox.com&gt;
Signed-off-by: Carol L Soto &lt;clsoto@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&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>
[ Upstream commit 9293267a3e2a7a2555d8ddc8f9301525e5b03b1b ]

We currently manage IRQs in pool_bm which is a bit field
of MAX_MSIX bits. Thus, allocating more than MAX_MSIX
interrupts can't be managed in pool_bm.
Fixing this by capping number of requested MSIXs to
MAX_MSIX.

Signed-off-by: Matan Barak &lt;matanb@mellanox.com&gt;
Signed-off-by: Carol L Soto &lt;clsoto@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mvneta: use inband status only when explicitly enabled</title>
<updated>2015-10-03T11:51:39+00:00</updated>
<author>
<name>Stas Sergeev</name>
<email>stsp@list.ru</email>
</author>
<published>2015-07-21T00:49:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0d106a6a020b5605c8a4748b9862af62ef2f8e59'/>
<id>0d106a6a020b5605c8a4748b9862af62ef2f8e59</id>
<content type='text'>
[ Upstream commit f8af8e6eb95093d5ce5ebcc52bd1929b0433e172 in net-next tree,
  will be pushed to Linus very soon. ]

The commit 898b2970e2c9 ("mvneta: implement SGMII-based in-band link state
signaling") implemented the link parameters auto-negotiation unconditionally.
Unfortunately it appears that some HW that implements SGMII protocol,
doesn't generate the inband status, so it is not possible to auto-negotiate
anything with such HW.

This patch enables the auto-negotiation only if explicitly requested with
the 'managed' DT property.

This patch fixes the following regression:
https://lkml.org/lkml/2015/7/8/865

Signed-off-by: Stas Sergeev &lt;stsp@users.sourceforge.net&gt;

CC: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
CC: netdev@vger.kernel.org
CC: linux-kernel@vger.kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&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>
[ Upstream commit f8af8e6eb95093d5ce5ebcc52bd1929b0433e172 in net-next tree,
  will be pushed to Linus very soon. ]

The commit 898b2970e2c9 ("mvneta: implement SGMII-based in-band link state
signaling") implemented the link parameters auto-negotiation unconditionally.
Unfortunately it appears that some HW that implements SGMII protocol,
doesn't generate the inband status, so it is not possible to auto-negotiate
anything with such HW.

This patch enables the auto-negotiation only if explicitly requested with
the 'managed' DT property.

This patch fixes the following regression:
https://lkml.org/lkml/2015/7/8/865

Signed-off-by: Stas Sergeev &lt;stsp@users.sourceforge.net&gt;

CC: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
CC: netdev@vger.kernel.org
CC: linux-kernel@vger.kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of_mdio: add new DT property 'managed' to specify the PHY management type</title>
<updated>2015-10-03T11:51:39+00:00</updated>
<author>
<name>Stas Sergeev</name>
<email>stsp@list.ru</email>
</author>
<published>2015-07-21T00:49:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=40448fc0043995e83336befcca83642f6f158c03'/>
<id>40448fc0043995e83336befcca83642f6f158c03</id>
<content type='text'>
[ Upstream commit 4cba5c2103657d43d0886e4cff8004d95a3d0def in net-next tree,
  will be pushed to Linus very soon. ]

Currently the PHY management type is selected by the MAC driver arbitrary.
The decision is based on the presence of the "fixed-link" node and on a
will of the driver's authors.
This caused a regression recently, when mvneta driver suddenly started
to use the in-band status for auto-negotiation on fixed links.
It appears the auto-negotiation may not work when expected by the MAC driver.
Sebastien Rannou explains:
&lt;&lt; Yes, I confirm that my HW does not generate an in-band status. AFAIK, it's
a PHY that aggregates 4xSGMIIs to 1xQSGMII ; the MAC side of the PHY (with
inband status) is connected to the switch through QSGMII, and in this context
we are on the media side of the PHY. &gt;&gt;
https://lkml.org/lkml/2015/7/10/206

This patch introduces the new string property 'managed' that allows
the user to set the management type explicitly.
The supported values are:
"auto" - default. Uses either MDIO or nothing, depending on the presence
of the fixed-link node
"in-band-status" - use in-band status

Signed-off-by: Stas Sergeev &lt;stsp@users.sourceforge.net&gt;

CC: Rob Herring &lt;robh+dt@kernel.org&gt;
CC: Pawel Moll &lt;pawel.moll@arm.com&gt;
CC: Mark Rutland &lt;mark.rutland@arm.com&gt;
CC: Ian Campbell &lt;ijc+devicetree@hellion.org.uk&gt;
CC: Kumar Gala &lt;galak@codeaurora.org&gt;
CC: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
CC: Grant Likely &lt;grant.likely@linaro.org&gt;
CC: devicetree@vger.kernel.org
CC: linux-kernel@vger.kernel.org
CC: netdev@vger.kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&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>
[ Upstream commit 4cba5c2103657d43d0886e4cff8004d95a3d0def in net-next tree,
  will be pushed to Linus very soon. ]

Currently the PHY management type is selected by the MAC driver arbitrary.
The decision is based on the presence of the "fixed-link" node and on a
will of the driver's authors.
This caused a regression recently, when mvneta driver suddenly started
to use the in-band status for auto-negotiation on fixed links.
It appears the auto-negotiation may not work when expected by the MAC driver.
Sebastien Rannou explains:
&lt;&lt; Yes, I confirm that my HW does not generate an in-band status. AFAIK, it's
a PHY that aggregates 4xSGMIIs to 1xQSGMII ; the MAC side of the PHY (with
inband status) is connected to the switch through QSGMII, and in this context
we are on the media side of the PHY. &gt;&gt;
https://lkml.org/lkml/2015/7/10/206

This patch introduces the new string property 'managed' that allows
the user to set the management type explicitly.
The supported values are:
"auto" - default. Uses either MDIO or nothing, depending on the presence
of the fixed-link node
"in-band-status" - use in-band status

Signed-off-by: Stas Sergeev &lt;stsp@users.sourceforge.net&gt;

CC: Rob Herring &lt;robh+dt@kernel.org&gt;
CC: Pawel Moll &lt;pawel.moll@arm.com&gt;
CC: Mark Rutland &lt;mark.rutland@arm.com&gt;
CC: Ian Campbell &lt;ijc+devicetree@hellion.org.uk&gt;
CC: Kumar Gala &lt;galak@codeaurora.org&gt;
CC: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
CC: Grant Likely &lt;grant.likely@linaro.org&gt;
CC: devicetree@vger.kernel.org
CC: linux-kernel@vger.kernel.org
CC: netdev@vger.kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: phy: fixed_phy: handle link-down case</title>
<updated>2015-10-03T11:51:39+00:00</updated>
<author>
<name>Stas Sergeev</name>
<email>stsp@list.ru</email>
</author>
<published>2015-07-21T00:49:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=bfba942d0d287d2765612629826b87a0749bf6bd'/>
<id>bfba942d0d287d2765612629826b87a0749bf6bd</id>
<content type='text'>
[ Upstream 868a4215be9a6d80548ccb74763b883dc99d32a2 in net-next tree,
  will be pushed to Linus very soon. ]

fixed_phy_register() currently hardcodes the fixed PHY link to 1, and
expects to find a "speed" parameter to provide correct information
towards the fixed PHY consumer.

In a subsequent change, where we allow "managed" (e.g: (RS)GMII in-band
status auto-negotiation) fixed PHYs, none of these parameters can be
provided since they will be auto-negotiated, hence, we just provide a
zero-initialized fixed_phy_status to fixed_phy_register() which makes it
fail when we call fixed_phy_update_regs() since status.speed = 0 which
makes us hit the "default" label and error out.

Without this change, we would also see potentially inconsistent
speed/duplex parameters for fixed PHYs when the link is DOWN.

CC: netdev@vger.kernel.org
CC: linux-kernel@vger.kernel.org
Signed-off-by: Stas Sergeev &lt;stsp@users.sourceforge.net&gt;
[florian: add more background to why this is correct and desirable]
Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&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>
[ Upstream 868a4215be9a6d80548ccb74763b883dc99d32a2 in net-next tree,
  will be pushed to Linus very soon. ]

fixed_phy_register() currently hardcodes the fixed PHY link to 1, and
expects to find a "speed" parameter to provide correct information
towards the fixed PHY consumer.

In a subsequent change, where we allow "managed" (e.g: (RS)GMII in-band
status auto-negotiation) fixed PHYs, none of these parameters can be
provided since they will be auto-negotiated, hence, we just provide a
zero-initialized fixed_phy_status to fixed_phy_register() which makes it
fail when we call fixed_phy_update_regs() since status.speed = 0 which
makes us hit the "default" label and error out.

Without this change, we would also see potentially inconsistent
speed/duplex parameters for fixed PHYs when the link is DOWN.

CC: netdev@vger.kernel.org
CC: linux-kernel@vger.kernel.org
Signed-off-by: Stas Sergeev &lt;stsp@users.sourceforge.net&gt;
[florian: add more background to why this is correct and desirable]
Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: dsa: bcm_sf2: Do not override speed settings</title>
<updated>2015-10-03T11:51:39+00:00</updated>
<author>
<name>Florian Fainelli</name>
<email>f.fainelli@gmail.com</email>
</author>
<published>2015-07-21T00:49:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b11c94db52901ca6b5167a2089f14e679cbe0cee'/>
<id>b11c94db52901ca6b5167a2089f14e679cbe0cee</id>
<content type='text'>
[ Upstream d2eac98f7d1b950b762a7eca05a9ce0ea1d878d2 in net-next tree,
  will be pushed to Linus very soon. ]

The SF2 driver currently overrides speed settings for its port
configured using a fixed PHY, this is both unnecessary and incorrect,
because we keep feedback to the hardware parameters that we read from
the PHY device, which in the case of a fixed PHY cannot possibly change
speed.

This is a required change to allow the fixed PHY code to allow
registering a PHY with a link configured as DOWN by default and avoid
some sort of circular dependency where we require the link_update
callback to run to program the hardware, and we then utilize the fixed
PHY parameters to program the hardware with the same settings.

Fixes: 246d7f773c13 ("net: dsa: add Broadcom SF2 switch driver")
Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&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>
[ Upstream d2eac98f7d1b950b762a7eca05a9ce0ea1d878d2 in net-next tree,
  will be pushed to Linus very soon. ]

The SF2 driver currently overrides speed settings for its port
configured using a fixed PHY, this is both unnecessary and incorrect,
because we keep feedback to the hardware parameters that we read from
the PHY device, which in the case of a fixed PHY cannot possibly change
speed.

This is a required change to allow the fixed PHY code to allow
registering a PHY with a link configured as DOWN by default and avoid
some sort of circular dependency where we require the link_update
callback to run to program the hardware, and we then utilize the fixed
PHY parameters to program the hardware with the same settings.

Fixes: 246d7f773c13 ("net: dsa: add Broadcom SF2 switch driver")
Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ppp: fix lockdep splat in ppp_dev_uninit()</title>
<updated>2015-10-03T11:51:39+00:00</updated>
<author>
<name>Guillaume Nault</name>
<email>g.nault@alphalink.fr</email>
</author>
<published>2015-09-24T10:54:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4c8f9d6cf799cf77d6e0a2ad0d26e066be630bf9'/>
<id>4c8f9d6cf799cf77d6e0a2ad0d26e066be630bf9</id>
<content type='text'>
[ Upstream commit 58a89ecaca53736aa465170530acea4f8be34ab4 ]

ppp_dev_uninit() locks all_ppp_mutex while under rtnl mutex protection.
ppp_create_interface() must then lock these mutexes in that same order
to avoid possible deadlock.

[  120.880011] ======================================================
[  120.880011] [ INFO: possible circular locking dependency detected ]
[  120.880011] 4.2.0 #1 Not tainted
[  120.880011] -------------------------------------------------------
[  120.880011] ppp-apitest/15827 is trying to acquire lock:
[  120.880011]  (&amp;pn-&gt;all_ppp_mutex){+.+.+.}, at: [&lt;ffffffffa0145f56&gt;] ppp_dev_uninit+0x64/0xb0 [ppp_generic]
[  120.880011]
[  120.880011] but task is already holding lock:
[  120.880011]  (rtnl_mutex){+.+.+.}, at: [&lt;ffffffff812e4255&gt;] rtnl_lock+0x12/0x14
[  120.880011]
[  120.880011] which lock already depends on the new lock.
[  120.880011]
[  120.880011]
[  120.880011] the existing dependency chain (in reverse order) is:
[  120.880011]
[  120.880011] -&gt; #1 (rtnl_mutex){+.+.+.}:
[  120.880011]        [&lt;ffffffff81073a6f&gt;] lock_acquire+0xcf/0x10e
[  120.880011]        [&lt;ffffffff813ab18a&gt;] mutex_lock_nested+0x56/0x341
[  120.880011]        [&lt;ffffffff812e4255&gt;] rtnl_lock+0x12/0x14
[  120.880011]        [&lt;ffffffff812d9d94&gt;] register_netdev+0x11/0x27
[  120.880011]        [&lt;ffffffffa0147b17&gt;] ppp_ioctl+0x289/0xc98 [ppp_generic]
[  120.880011]        [&lt;ffffffff8113b367&gt;] do_vfs_ioctl+0x4ea/0x532
[  120.880011]        [&lt;ffffffff8113b3fd&gt;] SyS_ioctl+0x4e/0x7d
[  120.880011]        [&lt;ffffffff813ad7d7&gt;] entry_SYSCALL_64_fastpath+0x12/0x6f
[  120.880011]
[  120.880011] -&gt; #0 (&amp;pn-&gt;all_ppp_mutex){+.+.+.}:
[  120.880011]        [&lt;ffffffff8107334e&gt;] __lock_acquire+0xb07/0xe76
[  120.880011]        [&lt;ffffffff81073a6f&gt;] lock_acquire+0xcf/0x10e
[  120.880011]        [&lt;ffffffff813ab18a&gt;] mutex_lock_nested+0x56/0x341
[  120.880011]        [&lt;ffffffffa0145f56&gt;] ppp_dev_uninit+0x64/0xb0 [ppp_generic]
[  120.880011]        [&lt;ffffffff812d5263&gt;] rollback_registered_many+0x19e/0x252
[  120.880011]        [&lt;ffffffff812d5381&gt;] rollback_registered+0x29/0x38
[  120.880011]        [&lt;ffffffff812d53fa&gt;] unregister_netdevice_queue+0x6a/0x77
[  120.880011]        [&lt;ffffffffa0146a94&gt;] ppp_release+0x42/0x79 [ppp_generic]
[  120.880011]        [&lt;ffffffff8112d9f6&gt;] __fput+0xec/0x192
[  120.880011]        [&lt;ffffffff8112dacc&gt;] ____fput+0x9/0xb
[  120.880011]        [&lt;ffffffff8105447a&gt;] task_work_run+0x66/0x80
[  120.880011]        [&lt;ffffffff81001801&gt;] prepare_exit_to_usermode+0x8c/0xa7
[  120.880011]        [&lt;ffffffff81001900&gt;] syscall_return_slowpath+0xe4/0x104
[  120.880011]        [&lt;ffffffff813ad931&gt;] int_ret_from_sys_call+0x25/0x9f
[  120.880011]
[  120.880011] other info that might help us debug this:
[  120.880011]
[  120.880011]  Possible unsafe locking scenario:
[  120.880011]
[  120.880011]        CPU0                    CPU1
[  120.880011]        ----                    ----
[  120.880011]   lock(rtnl_mutex);
[  120.880011]                                lock(&amp;pn-&gt;all_ppp_mutex);
[  120.880011]                                lock(rtnl_mutex);
[  120.880011]   lock(&amp;pn-&gt;all_ppp_mutex);
[  120.880011]
[  120.880011]  *** DEADLOCK ***

Fixes: 8cb775bc0a34 ("ppp: fix device unregistration upon netns deletion")
Reported-by: Sedat Dilek &lt;sedat.dilek@gmail.com&gt;
Tested-by: Sedat Dilek &lt;sedat.dilek@gmail.com&gt;
Signed-off-by: Guillaume Nault &lt;g.nault@alphalink.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&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>
[ Upstream commit 58a89ecaca53736aa465170530acea4f8be34ab4 ]

ppp_dev_uninit() locks all_ppp_mutex while under rtnl mutex protection.
ppp_create_interface() must then lock these mutexes in that same order
to avoid possible deadlock.

[  120.880011] ======================================================
[  120.880011] [ INFO: possible circular locking dependency detected ]
[  120.880011] 4.2.0 #1 Not tainted
[  120.880011] -------------------------------------------------------
[  120.880011] ppp-apitest/15827 is trying to acquire lock:
[  120.880011]  (&amp;pn-&gt;all_ppp_mutex){+.+.+.}, at: [&lt;ffffffffa0145f56&gt;] ppp_dev_uninit+0x64/0xb0 [ppp_generic]
[  120.880011]
[  120.880011] but task is already holding lock:
[  120.880011]  (rtnl_mutex){+.+.+.}, at: [&lt;ffffffff812e4255&gt;] rtnl_lock+0x12/0x14
[  120.880011]
[  120.880011] which lock already depends on the new lock.
[  120.880011]
[  120.880011]
[  120.880011] the existing dependency chain (in reverse order) is:
[  120.880011]
[  120.880011] -&gt; #1 (rtnl_mutex){+.+.+.}:
[  120.880011]        [&lt;ffffffff81073a6f&gt;] lock_acquire+0xcf/0x10e
[  120.880011]        [&lt;ffffffff813ab18a&gt;] mutex_lock_nested+0x56/0x341
[  120.880011]        [&lt;ffffffff812e4255&gt;] rtnl_lock+0x12/0x14
[  120.880011]        [&lt;ffffffff812d9d94&gt;] register_netdev+0x11/0x27
[  120.880011]        [&lt;ffffffffa0147b17&gt;] ppp_ioctl+0x289/0xc98 [ppp_generic]
[  120.880011]        [&lt;ffffffff8113b367&gt;] do_vfs_ioctl+0x4ea/0x532
[  120.880011]        [&lt;ffffffff8113b3fd&gt;] SyS_ioctl+0x4e/0x7d
[  120.880011]        [&lt;ffffffff813ad7d7&gt;] entry_SYSCALL_64_fastpath+0x12/0x6f
[  120.880011]
[  120.880011] -&gt; #0 (&amp;pn-&gt;all_ppp_mutex){+.+.+.}:
[  120.880011]        [&lt;ffffffff8107334e&gt;] __lock_acquire+0xb07/0xe76
[  120.880011]        [&lt;ffffffff81073a6f&gt;] lock_acquire+0xcf/0x10e
[  120.880011]        [&lt;ffffffff813ab18a&gt;] mutex_lock_nested+0x56/0x341
[  120.880011]        [&lt;ffffffffa0145f56&gt;] ppp_dev_uninit+0x64/0xb0 [ppp_generic]
[  120.880011]        [&lt;ffffffff812d5263&gt;] rollback_registered_many+0x19e/0x252
[  120.880011]        [&lt;ffffffff812d5381&gt;] rollback_registered+0x29/0x38
[  120.880011]        [&lt;ffffffff812d53fa&gt;] unregister_netdevice_queue+0x6a/0x77
[  120.880011]        [&lt;ffffffffa0146a94&gt;] ppp_release+0x42/0x79 [ppp_generic]
[  120.880011]        [&lt;ffffffff8112d9f6&gt;] __fput+0xec/0x192
[  120.880011]        [&lt;ffffffff8112dacc&gt;] ____fput+0x9/0xb
[  120.880011]        [&lt;ffffffff8105447a&gt;] task_work_run+0x66/0x80
[  120.880011]        [&lt;ffffffff81001801&gt;] prepare_exit_to_usermode+0x8c/0xa7
[  120.880011]        [&lt;ffffffff81001900&gt;] syscall_return_slowpath+0xe4/0x104
[  120.880011]        [&lt;ffffffff813ad931&gt;] int_ret_from_sys_call+0x25/0x9f
[  120.880011]
[  120.880011] other info that might help us debug this:
[  120.880011]
[  120.880011]  Possible unsafe locking scenario:
[  120.880011]
[  120.880011]        CPU0                    CPU1
[  120.880011]        ----                    ----
[  120.880011]   lock(rtnl_mutex);
[  120.880011]                                lock(&amp;pn-&gt;all_ppp_mutex);
[  120.880011]                                lock(rtnl_mutex);
[  120.880011]   lock(&amp;pn-&gt;all_ppp_mutex);
[  120.880011]
[  120.880011]  *** DEADLOCK ***

Fixes: 8cb775bc0a34 ("ppp: fix device unregistration upon netns deletion")
Reported-by: Sedat Dilek &lt;sedat.dilek@gmail.com&gt;
Tested-by: Sedat Dilek &lt;sedat.dilek@gmail.com&gt;
Signed-off-by: Guillaume Nault &lt;g.nault@alphalink.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fib_rules: fix fib rule dumps across multiple skbs</title>
<updated>2015-10-03T11:51:39+00:00</updated>
<author>
<name>Wilson Kok</name>
<email>wkok@cumulusnetworks.com</email>
</author>
<published>2015-09-23T04:40:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=45c191bb3aabf6df3db4ba5e94dd24b96edf6ab5'/>
<id>45c191bb3aabf6df3db4ba5e94dd24b96edf6ab5</id>
<content type='text'>
[ Upstream commit 41fc014332d91ee90c32840bf161f9685b7fbf2b ]

dump_rules returns skb length and not error.
But when family == AF_UNSPEC, the caller of dump_rules
assumes that it returns an error. Hence, when family == AF_UNSPEC,
we continue trying to dump on -EMSGSIZE errors resulting in
incorrect dump idx carried between skbs belonging to the same dump.
This results in fib rule dump always only dumping rules that fit
into the first skb.

This patch fixes dump_rules to return error so that we exit correctly
and idx is correctly maintained between skbs that are part of the
same dump.

Signed-off-by: Wilson Kok &lt;wkok@cumulusnetworks.com&gt;
Signed-off-by: Roopa Prabhu &lt;roopa@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&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>
[ Upstream commit 41fc014332d91ee90c32840bf161f9685b7fbf2b ]

dump_rules returns skb length and not error.
But when family == AF_UNSPEC, the caller of dump_rules
assumes that it returns an error. Hence, when family == AF_UNSPEC,
we continue trying to dump on -EMSGSIZE errors resulting in
incorrect dump idx carried between skbs belonging to the same dump.
This results in fib rule dump always only dumping rules that fit
into the first skb.

This patch fixes dump_rules to return error so that we exit correctly
and idx is correctly maintained between skbs that are part of the
same dump.

Signed-off-by: Wilson Kok &lt;wkok@cumulusnetworks.com&gt;
Signed-off-by: Roopa Prabhu &lt;roopa@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
