<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net/core/rtnetlink.c, branch v3.14.3</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>rtnetlink: fix fdb notification flags</title>
<updated>2014-03-20T20:24:28+00:00</updated>
<author>
<name>Nicolas Dichtel</name>
<email>nicolas.dichtel@6wind.com</email>
</author>
<published>2014-03-19T16:47:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1c104a6bebf3c16b6248408b84f91d09ac8a26b6'/>
<id>1c104a6bebf3c16b6248408b84f91d09ac8a26b6</id>
<content type='text'>
Commit 3ff661c38c84 ("net: rtnetlink notify events for FDB NTF_SELF adds and
deletes") reuses the function nlmsg_populate_fdb_fill() to notify fdb events.
But this function was used only for dump and thus was always setting the
flag NLM_F_MULTI, which is wrong in case of a single notification.

Libraries like libnl will wait forever for NLMSG_DONE.

CC: Thomas Graf &lt;tgraf@suug.ch&gt;
Signed-off-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Acked-by: Thomas Graf &lt;tgraf@suug.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 3ff661c38c84 ("net: rtnetlink notify events for FDB NTF_SELF adds and
deletes") reuses the function nlmsg_populate_fdb_fill() to notify fdb events.
But this function was used only for dump and thus was always setting the
flag NLM_F_MULTI, which is wrong in case of a single notification.

Libraries like libnl will wait forever for NLMSG_DONE.

CC: Thomas Graf &lt;tgraf@suug.ch&gt;
Signed-off-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Acked-by: Thomas Graf &lt;tgraf@suug.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: correct error path in rtnl_newlink()</title>
<updated>2014-02-13T22:08:29+00:00</updated>
<author>
<name>Cong Wang</name>
<email>cwang@twopensource.com</email>
</author>
<published>2014-02-11T23:51:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0e0eee2465df77bcec2e8ff75432b8e57897b143'/>
<id>0e0eee2465df77bcec2e8ff75432b8e57897b143</id>
<content type='text'>
I saw the following BUG when -&gt;newlink() fails in rtnl_newlink():

[   40.240058] kernel BUG at net/core/dev.c:6438!

this is due to free_netdev() is not supposed to be called before
netdev is completely unregistered, therefore it is not correct
to call free_netdev() here, at least for ops-&gt;newlink!=NULL case,
many drivers call it in -&gt;destructor so that rtnl_unlock() will
take care of it, we probably don't need to do anything here.

Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: Cong Wang &lt;cwang@twopensource.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I saw the following BUG when -&gt;newlink() fails in rtnl_newlink():

[   40.240058] kernel BUG at net/core/dev.c:6438!

this is due to free_netdev() is not supposed to be called before
netdev is completely unregistered, therefore it is not correct
to call free_netdev() here, at least for ops-&gt;newlink!=NULL case,
many drivers call it in -&gt;destructor so that rtnl_unlock() will
take care of it, we probably don't need to do anything here.

Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: Cong Wang &lt;cwang@twopensource.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtnetlink: fix oops in rtnl_link_get_slave_info_data_size</title>
<updated>2014-02-05T04:28:51+00:00</updated>
<author>
<name>Fernando Luis Vazquez Cao</name>
<email>fernando_b1@lab.ntt.co.jp</email>
</author>
<published>2014-02-04T10:35:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6049f2530cf2cb48a6fe8735309cc0b97aa7f700'/>
<id>6049f2530cf2cb48a6fe8735309cc0b97aa7f700</id>
<content type='text'>
We should check whether rtnetlink link operations
are defined before calling get_slave_size().

Without this, the following oops can occur when
adding a tap device to OVS.

[   87.839553] BUG: unable to handle kernel NULL pointer dereference at 00000000000000a8
[   87.839595] IP: [&lt;ffffffff813d47c0&gt;] if_nlmsg_size+0xf0/0x220
[...]
[   87.840651] Call Trace:
[   87.840664]  [&lt;ffffffff813d694b&gt;] ? rtmsg_ifinfo+0x2b/0x100
[   87.840688]  [&lt;ffffffff813c8340&gt;] ? __netdev_adjacent_dev_insert+0x150/0x1a0
[   87.840718]  [&lt;ffffffff813d6a50&gt;] ? rtnetlink_event+0x30/0x40
[   87.840742]  [&lt;ffffffff814b4144&gt;] ? notifier_call_chain+0x44/0x70
[   87.840768]  [&lt;ffffffff813c8946&gt;] ? __netdev_upper_dev_link+0x3c6/0x3f0
[   87.840798]  [&lt;ffffffffa0678d6c&gt;] ? netdev_create+0xcc/0x160 [openvswitch]
[   87.840828]  [&lt;ffffffffa06781ea&gt;] ? ovs_vport_add+0x4a/0xd0 [openvswitch]
[   87.840857]  [&lt;ffffffffa0670139&gt;] ? new_vport+0x9/0x50 [openvswitch]
[   87.840884]  [&lt;ffffffffa067279e&gt;] ? ovs_vport_cmd_new+0x11e/0x210 [openvswitch]
[   87.840915]  [&lt;ffffffff813f3efa&gt;] ? genl_family_rcv_msg+0x19a/0x360
[   87.840941]  [&lt;ffffffff813f40c0&gt;] ? genl_family_rcv_msg+0x360/0x360
[   87.840967]  [&lt;ffffffff813f4139&gt;] ? genl_rcv_msg+0x79/0xc0
[   87.840991]  [&lt;ffffffff813b6cf9&gt;] ? __kmalloc_reserve.isra.25+0x29/0x80
[   87.841018]  [&lt;ffffffff813f2389&gt;] ? netlink_rcv_skb+0xa9/0xc0
[   87.841042]  [&lt;ffffffff813f27cf&gt;] ? genl_rcv+0x1f/0x30
[   87.841064]  [&lt;ffffffff813f1988&gt;] ? netlink_unicast+0xe8/0x1e0
[   87.841088]  [&lt;ffffffff813f1d9a&gt;] ? netlink_sendmsg+0x31a/0x750
[   87.841113]  [&lt;ffffffff813aee96&gt;] ? sock_sendmsg+0x86/0xc0
[   87.841136]  [&lt;ffffffff813c960d&gt;] ? __netdev_update_features+0x4d/0x200
[   87.841163]  [&lt;ffffffff813ca94e&gt;] ? ethtool_get_value+0x2e/0x50
[   87.841188]  [&lt;ffffffff813af269&gt;] ? ___sys_sendmsg+0x359/0x370
[   87.841212]  [&lt;ffffffff813da686&gt;] ? dev_ioctl+0x1a6/0x5c0
[   87.841236]  [&lt;ffffffff8109c210&gt;] ? autoremove_wake_function+0x30/0x30
[   87.841264]  [&lt;ffffffff813ac59d&gt;] ? sock_do_ioctl+0x3d/0x50
[   87.841288]  [&lt;ffffffff813aca68&gt;] ? sock_ioctl+0x1e8/0x2c0
[   87.841312]  [&lt;ffffffff811934bf&gt;] ? do_vfs_ioctl+0x2cf/0x4b0
[   87.841335]  [&lt;ffffffff813afeb9&gt;] ? __sys_sendmsg+0x39/0x70
[   87.841362]  [&lt;ffffffff814b86f9&gt;] ? system_call_fastpath+0x16/0x1b
[   87.841386] Code: c0 74 10 48 89 ef ff d0 83 c0 07 83 e0 fc 48 98 49 01 c7 48 89 ef e8 d0 d6 fe ff 48 85 c0 0f 84 df 00 00 00 48 8b 90 08 07 00 00 &lt;48&gt; 8b 8a a8 00 00 00 31 d2 48 85 c9 74 0c 48 89 ee 48 89 c7 ff
[   87.841529] RIP  [&lt;ffffffff813d47c0&gt;] if_nlmsg_size+0xf0/0x220
[   87.841555]  RSP &lt;ffff880221aa5950&gt;
[   87.841569] CR2: 00000000000000a8
[   87.851442] ---[ end trace e42ab217691b4fc2 ]---

Signed-off-by: Fernando Luis Vazquez Cao &lt;fernando@oss.ntt.co.jp&gt;
Acked-by: Jiri Pirko &lt;jiri@resnulli.us&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should check whether rtnetlink link operations
are defined before calling get_slave_size().

Without this, the following oops can occur when
adding a tap device to OVS.

[   87.839553] BUG: unable to handle kernel NULL pointer dereference at 00000000000000a8
[   87.839595] IP: [&lt;ffffffff813d47c0&gt;] if_nlmsg_size+0xf0/0x220
[...]
[   87.840651] Call Trace:
[   87.840664]  [&lt;ffffffff813d694b&gt;] ? rtmsg_ifinfo+0x2b/0x100
[   87.840688]  [&lt;ffffffff813c8340&gt;] ? __netdev_adjacent_dev_insert+0x150/0x1a0
[   87.840718]  [&lt;ffffffff813d6a50&gt;] ? rtnetlink_event+0x30/0x40
[   87.840742]  [&lt;ffffffff814b4144&gt;] ? notifier_call_chain+0x44/0x70
[   87.840768]  [&lt;ffffffff813c8946&gt;] ? __netdev_upper_dev_link+0x3c6/0x3f0
[   87.840798]  [&lt;ffffffffa0678d6c&gt;] ? netdev_create+0xcc/0x160 [openvswitch]
[   87.840828]  [&lt;ffffffffa06781ea&gt;] ? ovs_vport_add+0x4a/0xd0 [openvswitch]
[   87.840857]  [&lt;ffffffffa0670139&gt;] ? new_vport+0x9/0x50 [openvswitch]
[   87.840884]  [&lt;ffffffffa067279e&gt;] ? ovs_vport_cmd_new+0x11e/0x210 [openvswitch]
[   87.840915]  [&lt;ffffffff813f3efa&gt;] ? genl_family_rcv_msg+0x19a/0x360
[   87.840941]  [&lt;ffffffff813f40c0&gt;] ? genl_family_rcv_msg+0x360/0x360
[   87.840967]  [&lt;ffffffff813f4139&gt;] ? genl_rcv_msg+0x79/0xc0
[   87.840991]  [&lt;ffffffff813b6cf9&gt;] ? __kmalloc_reserve.isra.25+0x29/0x80
[   87.841018]  [&lt;ffffffff813f2389&gt;] ? netlink_rcv_skb+0xa9/0xc0
[   87.841042]  [&lt;ffffffff813f27cf&gt;] ? genl_rcv+0x1f/0x30
[   87.841064]  [&lt;ffffffff813f1988&gt;] ? netlink_unicast+0xe8/0x1e0
[   87.841088]  [&lt;ffffffff813f1d9a&gt;] ? netlink_sendmsg+0x31a/0x750
[   87.841113]  [&lt;ffffffff813aee96&gt;] ? sock_sendmsg+0x86/0xc0
[   87.841136]  [&lt;ffffffff813c960d&gt;] ? __netdev_update_features+0x4d/0x200
[   87.841163]  [&lt;ffffffff813ca94e&gt;] ? ethtool_get_value+0x2e/0x50
[   87.841188]  [&lt;ffffffff813af269&gt;] ? ___sys_sendmsg+0x359/0x370
[   87.841212]  [&lt;ffffffff813da686&gt;] ? dev_ioctl+0x1a6/0x5c0
[   87.841236]  [&lt;ffffffff8109c210&gt;] ? autoremove_wake_function+0x30/0x30
[   87.841264]  [&lt;ffffffff813ac59d&gt;] ? sock_do_ioctl+0x3d/0x50
[   87.841288]  [&lt;ffffffff813aca68&gt;] ? sock_ioctl+0x1e8/0x2c0
[   87.841312]  [&lt;ffffffff811934bf&gt;] ? do_vfs_ioctl+0x2cf/0x4b0
[   87.841335]  [&lt;ffffffff813afeb9&gt;] ? __sys_sendmsg+0x39/0x70
[   87.841362]  [&lt;ffffffff814b86f9&gt;] ? system_call_fastpath+0x16/0x1b
[   87.841386] Code: c0 74 10 48 89 ef ff d0 83 c0 07 83 e0 fc 48 98 49 01 c7 48 89 ef e8 d0 d6 fe ff 48 85 c0 0f 84 df 00 00 00 48 8b 90 08 07 00 00 &lt;48&gt; 8b 8a a8 00 00 00 31 d2 48 85 c9 74 0c 48 89 ee 48 89 c7 ff
[   87.841529] RIP  [&lt;ffffffff813d47c0&gt;] if_nlmsg_size+0xf0/0x220
[   87.841555]  RSP &lt;ffff880221aa5950&gt;
[   87.841569] CR2: 00000000000000a8
[   87.851442] ---[ end trace e42ab217691b4fc2 ]---

Signed-off-by: Fernando Luis Vazquez Cao &lt;fernando@oss.ntt.co.jp&gt;
Acked-by: Jiri Pirko &lt;jiri@resnulli.us&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtnetlink: remove check for fill_slave_info in rtnl_have_link_slave_info</title>
<updated>2014-01-24T00:21:48+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@resnulli.us</email>
</author>
<published>2014-01-23T18:19:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=813f020c5d16878486b9a103bd59831846652247'/>
<id>813f020c5d16878486b9a103bd59831846652247</id>
<content type='text'>
This check is not needed because the same check is done before
fill_slave_info is used in rtnl_link_slave_info_fill.
Also, by removing this check, kernel will fillup IFLA_INFO_SLAVE_KIND
even for slaves of masters which does not implement fill_slave_info.

Signed-off-by: Jiri Pirko &lt;jiri@resnulli.us&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This check is not needed because the same check is done before
fill_slave_info is used in rtnl_link_slave_info_fill.
Also, by removing this check, kernel will fillup IFLA_INFO_SLAVE_KIND
even for slaves of masters which does not implement fill_slave_info.

Signed-off-by: Jiri Pirko &lt;jiri@resnulli.us&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bonding: convert netlink to use slave data info api</title>
<updated>2014-01-23T05:57:17+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@resnulli.us</email>
</author>
<published>2014-01-22T08:05:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3bad540ed8285fb53f6365420bba0320d8cd2066'/>
<id>3bad540ed8285fb53f6365420bba0320d8cd2066</id>
<content type='text'>
Signed-off-by: Jiri Pirko &lt;jiri@resnulli.us&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Jiri Pirko &lt;jiri@resnulli.us&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtnetlink: provide api for getting and setting slave info</title>
<updated>2014-01-23T05:57:05+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@resnulli.us</email>
</author>
<published>2014-01-22T08:05:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ba7d49b1f0f8e5f24294a880ed576964059af5ef'/>
<id>ba7d49b1f0f8e5f24294a880ed576964059af5ef</id>
<content type='text'>
Recent patch
bonding: add netlink attributes to slave link dev (1d3ee88ae0d6)

Introduced yet another device specific way to access slave information
over rtnetlink. There is one already there for bridge.

This patch introduces generic way to do this, for getting and setting
info as well by extending link_ops. Later on, this new interface will
be used for bridge ports as well.

Signed-off-by: Jiri Pirko &lt;jiri@resnulli.us&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Recent patch
bonding: add netlink attributes to slave link dev (1d3ee88ae0d6)

Introduced yet another device specific way to access slave information
over rtnetlink. There is one already there for bridge.

This patch introduces generic way to do this, for getting and setting
info as well by extending link_ops. Later on, this new interface will
be used for bridge ports as well.

Signed-off-by: Jiri Pirko &lt;jiri@resnulli.us&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtnetlink: put "BOND" into nl attribute names which are related to bonding</title>
<updated>2014-01-23T05:57:05+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@resnulli.us</email>
</author>
<published>2014-01-22T08:05:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=df7dbcbbafc0b8f3fb31a40c6f3c4a7e15cb0b40'/>
<id>df7dbcbbafc0b8f3fb31a40c6f3c4a7e15cb0b40</id>
<content type='text'>
Signed-off-by: Jiri Pirko &lt;jiri@resnulli.us&gt;
Acked-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Jiri Pirko &lt;jiri@resnulli.us&gt;
Acked-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bonding: add netlink attributes to slave link dev</title>
<updated>2014-01-18T02:51:58+00:00</updated>
<author>
<name>sfeldma@cumulusnetworks.com</name>
<email>sfeldma@cumulusnetworks.com</email>
</author>
<published>2014-01-17T06:57:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1d3ee88ae0d605629bf369ab0b868dae8ca62a48'/>
<id>1d3ee88ae0d605629bf369ab0b868dae8ca62a48</id>
<content type='text'>
If link is IFF_SLAVE, extend link dev netlink attributes to include
slave attributes with new IFLA_SLAVE nest.  Add netlink notification
(RTM_NEWLINK) when slave status changes from backup to active, or
visa-versa.

Adds new ndo_get_slave op to net_device_ops to fill skb with IFLA_SLAVE
attributes.  Currently only used by bonding driver, but could be
used by other aggregating devices with slaves.

Signed-off-by: Scott Feldman &lt;sfeldma@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If link is IFF_SLAVE, extend link dev netlink attributes to include
slave attributes with new IFLA_SLAVE nest.  Add netlink notification
(RTM_NEWLINK) when slave status changes from backup to active, or
visa-versa.

Adds new ndo_get_slave op to net_device_ops to fill skb with IFLA_SLAVE
attributes.  Currently only used by bonding driver, but could be
used by other aggregating devices with slaves.

Signed-off-by: Scott Feldman &lt;sfeldma@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netlink: cleanup rntl_af_register</title>
<updated>2014-01-02T04:42:19+00:00</updated>
<author>
<name>stephen hemminger</name>
<email>stephen@networkplumber.org</email>
</author>
<published>2013-12-30T18:41:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3678a9d86324e457d0ff9d898747ee7e787f4bb8'/>
<id>3678a9d86324e457d0ff9d898747ee7e787f4bb8</id>
<content type='text'>
The function __rtnl_af_register is never called outside this
code, and the return value is always 0.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function __rtnl_af_register is never called outside this
code, and the return value is always 0.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: fix rtnl notification in atomic context</title>
<updated>2013-10-25T23:03:45+00:00</updated>
<author>
<name>Alexei Starovoitov</name>
<email>ast@plumgrid.com</email>
</author>
<published>2013-10-23T23:02:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7f29405403d7c17f539c099987972b862e7e5255'/>
<id>7f29405403d7c17f539c099987972b862e7e5255</id>
<content type='text'>
commit 991fb3f74c "dev: always advertise rx_flags changes via netlink"
introduced rtnl notification from __dev_set_promiscuity(),
which can be called in atomic context.

Steps to reproduce:
ip tuntap add dev tap1 mode tap
ifconfig tap1 up
tcpdump -nei tap1 &amp;
ip tuntap del dev tap1 mode tap

[  271.627994] device tap1 left promiscuous mode
[  271.639897] BUG: sleeping function called from invalid context at mm/slub.c:940
[  271.664491] in_atomic(): 1, irqs_disabled(): 0, pid: 3394, name: ip
[  271.677525] INFO: lockdep is turned off.
[  271.690503] CPU: 0 PID: 3394 Comm: ip Tainted: G        W    3.12.0-rc3+ #73
[  271.703996] Hardware name: System manufacturer System Product Name/P8Z77 WS, BIOS 3007 07/26/2012
[  271.731254]  ffffffff81a58506 ffff8807f0d57a58 ffffffff817544e5 ffff88082fa0f428
[  271.760261]  ffff8808071f5f40 ffff8807f0d57a88 ffffffff8108bad1 ffffffff81110ff8
[  271.790683]  0000000000000010 00000000000000d0 00000000000000d0 ffff8807f0d57af8
[  271.822332] Call Trace:
[  271.838234]  [&lt;ffffffff817544e5&gt;] dump_stack+0x55/0x76
[  271.854446]  [&lt;ffffffff8108bad1&gt;] __might_sleep+0x181/0x240
[  271.870836]  [&lt;ffffffff81110ff8&gt;] ? rcu_irq_exit+0x68/0xb0
[  271.887076]  [&lt;ffffffff811a80be&gt;] kmem_cache_alloc_node+0x4e/0x2a0
[  271.903368]  [&lt;ffffffff810b4ddc&gt;] ? vprintk_emit+0x1dc/0x5a0
[  271.919716]  [&lt;ffffffff81614d67&gt;] ? __alloc_skb+0x57/0x2a0
[  271.936088]  [&lt;ffffffff810b4de0&gt;] ? vprintk_emit+0x1e0/0x5a0
[  271.952504]  [&lt;ffffffff81614d67&gt;] __alloc_skb+0x57/0x2a0
[  271.968902]  [&lt;ffffffff8163a0b2&gt;] rtmsg_ifinfo+0x52/0x100
[  271.985302]  [&lt;ffffffff8162ac6d&gt;] __dev_notify_flags+0xad/0xc0
[  272.001642]  [&lt;ffffffff8162ad0c&gt;] __dev_set_promiscuity+0x8c/0x1c0
[  272.017917]  [&lt;ffffffff81731ea5&gt;] ? packet_notifier+0x5/0x380
[  272.033961]  [&lt;ffffffff8162b109&gt;] dev_set_promiscuity+0x29/0x50
[  272.049855]  [&lt;ffffffff8172e937&gt;] packet_dev_mc+0x87/0xc0
[  272.065494]  [&lt;ffffffff81732052&gt;] packet_notifier+0x1b2/0x380
[  272.080915]  [&lt;ffffffff81731ea5&gt;] ? packet_notifier+0x5/0x380
[  272.096009]  [&lt;ffffffff81761c66&gt;] notifier_call_chain+0x66/0x150
[  272.110803]  [&lt;ffffffff8108503e&gt;] __raw_notifier_call_chain+0xe/0x10
[  272.125468]  [&lt;ffffffff81085056&gt;] raw_notifier_call_chain+0x16/0x20
[  272.139984]  [&lt;ffffffff81620190&gt;] call_netdevice_notifiers_info+0x40/0x70
[  272.154523]  [&lt;ffffffff816201d6&gt;] call_netdevice_notifiers+0x16/0x20
[  272.168552]  [&lt;ffffffff816224c5&gt;] rollback_registered_many+0x145/0x240
[  272.182263]  [&lt;ffffffff81622641&gt;] rollback_registered+0x31/0x40
[  272.195369]  [&lt;ffffffff816229c8&gt;] unregister_netdevice_queue+0x58/0x90
[  272.208230]  [&lt;ffffffff81547ca0&gt;] __tun_detach+0x140/0x340
[  272.220686]  [&lt;ffffffff81547ed6&gt;] tun_chr_close+0x36/0x60

Signed-off-by: Alexei Starovoitov &lt;ast@plumgrid.com&gt;
Acked-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 991fb3f74c "dev: always advertise rx_flags changes via netlink"
introduced rtnl notification from __dev_set_promiscuity(),
which can be called in atomic context.

Steps to reproduce:
ip tuntap add dev tap1 mode tap
ifconfig tap1 up
tcpdump -nei tap1 &amp;
ip tuntap del dev tap1 mode tap

[  271.627994] device tap1 left promiscuous mode
[  271.639897] BUG: sleeping function called from invalid context at mm/slub.c:940
[  271.664491] in_atomic(): 1, irqs_disabled(): 0, pid: 3394, name: ip
[  271.677525] INFO: lockdep is turned off.
[  271.690503] CPU: 0 PID: 3394 Comm: ip Tainted: G        W    3.12.0-rc3+ #73
[  271.703996] Hardware name: System manufacturer System Product Name/P8Z77 WS, BIOS 3007 07/26/2012
[  271.731254]  ffffffff81a58506 ffff8807f0d57a58 ffffffff817544e5 ffff88082fa0f428
[  271.760261]  ffff8808071f5f40 ffff8807f0d57a88 ffffffff8108bad1 ffffffff81110ff8
[  271.790683]  0000000000000010 00000000000000d0 00000000000000d0 ffff8807f0d57af8
[  271.822332] Call Trace:
[  271.838234]  [&lt;ffffffff817544e5&gt;] dump_stack+0x55/0x76
[  271.854446]  [&lt;ffffffff8108bad1&gt;] __might_sleep+0x181/0x240
[  271.870836]  [&lt;ffffffff81110ff8&gt;] ? rcu_irq_exit+0x68/0xb0
[  271.887076]  [&lt;ffffffff811a80be&gt;] kmem_cache_alloc_node+0x4e/0x2a0
[  271.903368]  [&lt;ffffffff810b4ddc&gt;] ? vprintk_emit+0x1dc/0x5a0
[  271.919716]  [&lt;ffffffff81614d67&gt;] ? __alloc_skb+0x57/0x2a0
[  271.936088]  [&lt;ffffffff810b4de0&gt;] ? vprintk_emit+0x1e0/0x5a0
[  271.952504]  [&lt;ffffffff81614d67&gt;] __alloc_skb+0x57/0x2a0
[  271.968902]  [&lt;ffffffff8163a0b2&gt;] rtmsg_ifinfo+0x52/0x100
[  271.985302]  [&lt;ffffffff8162ac6d&gt;] __dev_notify_flags+0xad/0xc0
[  272.001642]  [&lt;ffffffff8162ad0c&gt;] __dev_set_promiscuity+0x8c/0x1c0
[  272.017917]  [&lt;ffffffff81731ea5&gt;] ? packet_notifier+0x5/0x380
[  272.033961]  [&lt;ffffffff8162b109&gt;] dev_set_promiscuity+0x29/0x50
[  272.049855]  [&lt;ffffffff8172e937&gt;] packet_dev_mc+0x87/0xc0
[  272.065494]  [&lt;ffffffff81732052&gt;] packet_notifier+0x1b2/0x380
[  272.080915]  [&lt;ffffffff81731ea5&gt;] ? packet_notifier+0x5/0x380
[  272.096009]  [&lt;ffffffff81761c66&gt;] notifier_call_chain+0x66/0x150
[  272.110803]  [&lt;ffffffff8108503e&gt;] __raw_notifier_call_chain+0xe/0x10
[  272.125468]  [&lt;ffffffff81085056&gt;] raw_notifier_call_chain+0x16/0x20
[  272.139984]  [&lt;ffffffff81620190&gt;] call_netdevice_notifiers_info+0x40/0x70
[  272.154523]  [&lt;ffffffff816201d6&gt;] call_netdevice_notifiers+0x16/0x20
[  272.168552]  [&lt;ffffffff816224c5&gt;] rollback_registered_many+0x145/0x240
[  272.182263]  [&lt;ffffffff81622641&gt;] rollback_registered+0x31/0x40
[  272.195369]  [&lt;ffffffff816229c8&gt;] unregister_netdevice_queue+0x58/0x90
[  272.208230]  [&lt;ffffffff81547ca0&gt;] __tun_detach+0x140/0x340
[  272.220686]  [&lt;ffffffff81547ed6&gt;] tun_chr_close+0x36/0x60

Signed-off-by: Alexei Starovoitov &lt;ast@plumgrid.com&gt;
Acked-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
