<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/netconsole.c, branch v3.0.86</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/net/netconsole.c?h=v3.0.86</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/net/netconsole.c?h=v3.0.86'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-03-28T19:05:59Z</updated>
<entry>
<title>netconsole: don't call __netpoll_cleanup() while atomic</title>
<updated>2013-03-28T19:05:59Z</updated>
<author>
<name>Veaceslav Falico</name>
<email>vfalico@redhat.com</email>
</author>
<published>2013-03-11T00:21:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0f4bab2da773a765a4025189bb6fb2ffacccf91a'/>
<id>urn:sha1:0f4bab2da773a765a4025189bb6fb2ffacccf91a</id>
<content type='text'>
[ Upstream commit 3f315bef23075ea8a98a6fe4221a83b83456d970 ]

__netpoll_cleanup() is called in netconsole_netdev_event() while holding a
spinlock. Release/acquire the spinlock before/after it and restart the
loop. Also, disable the netconsole completely, because we won't have chance
after the restart of the loop, and might end up in a situation where
nt-&gt;enabled == 1 and nt-&gt;np.dev == NULL.

Signed-off-by: Veaceslav Falico &lt;vfalico@redhat.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.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>
</entry>
<entry>
<title>netconsole: remove a redundant netconsole_target_put()</title>
<updated>2012-10-02T16:47:23Z</updated>
<author>
<name>Amerigo Wang</name>
<email>amwang@redhat.com</email>
</author>
<published>2012-08-18T07:02:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b0b5cee7c407680ffb2805e47d8c896cdae988b0'/>
<id>urn:sha1:b0b5cee7c407680ffb2805e47d8c896cdae988b0</id>
<content type='text'>
commit 72d3eb13b5c0abe7d63efac41f39c5b644c7bbaa upstream.

This netconsole_target_put() is obviously redundant, and it
causes a kernel segfault when removing a bridge device which has
netconsole running on it.

This is caused by:

	commit 8d8fc29d02a33e4bd5f4fa47823c1fd386346093
	Author: Amerigo Wang &lt;amwang@redhat.com&gt;
	Date:   Thu May 19 21:39:10 2011 +0000

	    netpoll: disable netpoll when enslave a device

Signed-off-by: Cong Wang &lt;amwang@redhat.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>
</entry>
<entry>
<title>netconsole: enable netconsole can make net_device refcnt incorrent</title>
<updated>2011-11-11T17:36:27Z</updated>
<author>
<name>Gao feng</name>
<email>gaofeng@cn.fujitsu.com</email>
</author>
<published>2011-10-11T16:08:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=18743353b3154f0ff7c29f3c5ae3a8466a70d73a'/>
<id>urn:sha1:18743353b3154f0ff7c29f3c5ae3a8466a70d73a</id>
<content type='text'>
[ Upstream commit d5123480b1d6f7d1a5fe1a13520cef88fb5d4c84 ]

There is no check if netconsole is enabled current.
so when exec echo 1 &gt; enabled;
the reference of net_device will increment always.

Signed-off-by: Gao feng &lt;gaofeng@cn.fujitsu.com&gt;
Acked-by: Flavio Leitner &lt;fbl@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>net: rename NETDEV_BONDING_DESLAVE to NETDEV_RELEASE</title>
<updated>2011-05-23T01:01:19Z</updated>
<author>
<name>Amerigo Wang</name>
<email>amwang@redhat.com</email>
</author>
<published>2011-05-19T21:39:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=daf9209bb2c8b07ca025eac82e3d175534086c77'/>
<id>urn:sha1:daf9209bb2c8b07ca025eac82e3d175534086c77</id>
<content type='text'>
s/NETDEV_BONDING_DESLAVE/NETDEV_RELEASE/ as Andy suggested.

Signed-off-by: WANG Cong &lt;amwang@redhat.com&gt;
Cc: Andy Gospodarek &lt;andy@greyhouse.net&gt;
Cc: Neil Horman &lt;nhorman@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netpoll: disable netpoll when enslave a device</title>
<updated>2011-05-23T01:01:19Z</updated>
<author>
<name>Amerigo Wang</name>
<email>amwang@redhat.com</email>
</author>
<published>2011-05-19T21:39:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8d8fc29d02a33e4bd5f4fa47823c1fd386346093'/>
<id>urn:sha1:8d8fc29d02a33e4bd5f4fa47823c1fd386346093</id>
<content type='text'>
V3: rename NETDEV_ENSLAVE to NETDEV_JOIN

Currently we do nothing when we enslave a net device which is running netconsole.
Neil pointed out that we may get weird results in such case, so let's disable
netpoll on the device being enslaved. I think it is too harsh to prevent
the device being ensalved if it is running netconsole.

By the way, this patch also removes the NETDEV_GOING_DOWN from netconsole
netdev notifier, because netpoll will check if the device is running or not
and we don't handle NETDEV_PRE_UP neither.

This patch is based on net-next-2.6.

Signed-off-by: WANG Cong &lt;amwang@redhat.com&gt;
Cc: Neil Horman &lt;nhorman@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: add mac_pton() for parsing MAC address</title>
<updated>2011-05-09T19:10:49Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2011-05-07T23:00:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4940fc889e1e63667a15243028ddcd84d471cd8e'/>
<id>urn:sha1:4940fc889e1e63667a15243028ddcd84d471cd8e</id>
<content type='text'>
mac_pton() parses MAC address in form XX:XX:XX:XX:XX:XX and only in that form.

mac_pton() doesn't dirty result until it's sure string representation is valid.

mac_pton() doesn't care about characters _after_ last octet,
it's up to caller to deal with it.

mac_pton() diverges from 0/-E return value convention.
Target usage:

	if (!mac_pton(str, whatever-&gt;mac))
		return -EINVAL;
	/* -&gt;mac being u8 [ETH_ALEN] is filled at this point. */
	/* optionally check str[3 * ETH_ALEN - 1] for termination */

Use mac_pton() in pktgen and netconsole for start.

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netconsole: switch to kstrto*() functions</title>
<updated>2011-05-09T19:10:48Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2011-05-07T20:33:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=99f823f98fb981b55c663a3783c3d2293958ece4'/>
<id>urn:sha1:99f823f98fb981b55c663a3783c3d2293958ece4</id>
<content type='text'>
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netconsole: fix deadlock when removing net driver that netconsole is using (v2)</title>
<updated>2011-04-22T21:33:51Z</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@tuxdriver.com</email>
</author>
<published>2011-04-22T08:10:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=13f172ff26563995049abe73f6eeba828de3c09d'/>
<id>urn:sha1:13f172ff26563995049abe73f6eeba828de3c09d</id>
<content type='text'>
A deadlock was reported to me recently that occured when netconsole was being
used in a virtual guest.  If the virtio_net driver was removed while netconsole
was setup to use an interface that was driven by that driver, the guest
deadlocked.  No backtrace was provided because netconsole was the only console
configured, but it became clear pretty quickly what the problem was.  In
netconsole_netdev_event, if we get an unregister event, we call
__netpoll_cleanup with the target_list_lock held and irqs disabled.
__netpoll_cleanup can, if pending netpoll packets are waiting call
cancel_delayed_work_sync, which is a sleeping path.  the might_sleep call in
that path gets triggered, causing a console warning to be issued.  The
netconsole write handler of course tries to take the target_list_lock again,
which we already hold, causing deadlock.

The fix is pretty striaghtforward.  Simply drop the target_list_lock and
re-enable irqs prior to calling __netpoll_cleanup, the re-acquire the lock, and
restart the loop.  Confirmed by myself to fix the problem reported.

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
CC: "David S. Miller" &lt;davem@davemloft.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netconsole: clarify stopping message</title>
<updated>2011-01-06T19:30:23Z</updated>
<author>
<name>Ferenc Wagner</name>
<email>wferi@niif.hu</email>
</author>
<published>2011-01-06T05:11:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=38cfb907a55f3223445151b517b6e4678b8c9d66'/>
<id>urn:sha1:38cfb907a55f3223445151b517b6e4678b8c9d66</id>
<content type='text'>
Signed-off-by: Ferenc Wagner &lt;wferi@niif.hu&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netconsole: don't announce stopping if nothing happened</title>
<updated>2011-01-06T19:30:22Z</updated>
<author>
<name>Ferenc Wagner</name>
<email>wferi@niif.hu</email>
</author>
<published>2011-01-06T05:11:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=141dfba342b672588799432d74a3b6be88b5d713'/>
<id>urn:sha1:141dfba342b672588799432d74a3b6be88b5d713</id>
<content type='text'>
Signed-off-by: Ferenc Wagner &lt;wferi@niif.hu&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
