<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/packet, branch v3.7.3</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/packet?h=v3.7.3</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/packet?h=v3.7.3'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-09-10T19:30:41Z</updated>
<entry>
<title>netlink: Rename pid to portid to avoid confusion</title>
<updated>2012-09-10T19:30:41Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-09-07T20:12:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=15e473046cb6e5d18a4d0057e61d76315230382b'/>
<id>urn:sha1:15e473046cb6e5d18a4d0057e61d76315230382b</id>
<content type='text'>
It is a frequent mistake to confuse the netlink port identifier with a
process identifier.  Try to reduce this confusion by renaming fields
that hold port identifiers portid instead of pid.

I have carefully avoided changing the structures exported to
userspace to avoid changing the userspace API.

I have successfully built an allyesconfig kernel with this change.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Acked-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2012-08-31T19:14:18Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-08-31T19:14:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c32f38619af6302da58835fb292b159bdd96d11f'/>
<id>urn:sha1:c32f38619af6302da58835fb292b159bdd96d11f</id>
<content type='text'>
Merge the 'net' tree to get the recent set of netfilter bug fixes in
order to assist with some merge hassles Pablo is going to have to deal
with for upcoming changes.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace</title>
<updated>2012-08-24T22:54:37Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-08-24T22:54:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e6acb384807406c1a6ad3ddc91191f7658e63b7a'/>
<id>urn:sha1:e6acb384807406c1a6ad3ddc91191f7658e63b7a</id>
<content type='text'>
This is an initial merge in of Eric Biederman's work to start adding
user namespace support to the networking.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>af_packet: match_fanout_group() can be static</title>
<updated>2012-08-23T16:27:12Z</updated>
<author>
<name>Fengguang Wu</name>
<email>fengguang.wu@intel.com</email>
</author>
<published>2012-08-23T11:51:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a0dfb2634e5671770f598cda08002d8cda66ac77'/>
<id>urn:sha1:a0dfb2634e5671770f598cda08002d8cda66ac77</id>
<content type='text'>
cc: Eric Leblond &lt;eric@regit.org&gt;
Signed-off-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>packet: Protect packet sk list with mutex (v2)</title>
<updated>2012-08-23T05:58:27Z</updated>
<author>
<name>Pavel Emelyanov</name>
<email>xemul@parallels.com</email>
</author>
<published>2012-08-21T01:06:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0fa7fa98dbcc2789409ed24e885485e645803d7f'/>
<id>urn:sha1:0fa7fa98dbcc2789409ed24e885485e645803d7f</id>
<content type='text'>
Change since v1:

* Fixed inuse counters access spotted by Eric

In patch eea68e2f (packet: Report socket mclist info via diag module) I've
introduced a "scheduling in atomic" problem in packet diag module -- the
socket list is traversed under rcu_read_lock() while performed under it sk
mclist access requires rtnl lock (i.e. -- mutex) to be taken.

[152363.820563] BUG: scheduling while atomic: crtools/12517/0x10000002
[152363.820573] 4 locks held by crtools/12517:
[152363.820581]  #0:  (sock_diag_mutex){+.+.+.}, at: [&lt;ffffffff81a2dcb5&gt;] sock_diag_rcv+0x1f/0x3e
[152363.820613]  #1:  (sock_diag_table_mutex){+.+.+.}, at: [&lt;ffffffff81a2de70&gt;] sock_diag_rcv_msg+0xdb/0x11a
[152363.820644]  #2:  (nlk-&gt;cb_mutex){+.+.+.}, at: [&lt;ffffffff81a67d01&gt;] netlink_dump+0x23/0x1ab
[152363.820693]  #3:  (rcu_read_lock){.+.+..}, at: [&lt;ffffffff81b6a049&gt;] packet_diag_dump+0x0/0x1af

Similar thing was then re-introduced by further packet diag patches (fanount
mutex and pgvec mutex for rings) :(

Apart from being terribly sorry for the above, I propose to change the packet
sk list protection from spinlock to mutex. This lock currently protects two
modifications:

* sklist
* prot inuse counters

The sklist modifications can be just reprotected with mutex since they already
occur in a sleeping context. The inuse counters modifications are trickier -- the
__this_cpu_-s are used inside, thus requiring the caller to handle the potential
issues with contexts himself. Since packet sockets' counters are modified in two
places only (packet_create and packet_release) we only need to protect the context
from being preempted. BH disabling is not required in this case.

Signed-off-by: Pavel Emelyanov &lt;xemul@parallels.com&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>af_packet: use define instead of constant</title>
<updated>2012-08-23T05:58:27Z</updated>
<author>
<name>danborkmann@iogearbox.net</name>
<email>danborkmann@iogearbox.net</email>
</author>
<published>2012-08-20T03:34:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9e67030af367ab524d0856af9e992de241eca3c7'/>
<id>urn:sha1:9e67030af367ab524d0856af9e992de241eca3c7</id>
<content type='text'>
Instead of using a hard-coded value for the status variable, it would make
the code more readable to use its destined define from linux/if_packet.h.

Signed-off-by: daniel.borkmann@tik.ee.ethz.ch
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2012-08-22T21:21:38Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-08-22T21:21:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1304a7343b30fc4f16045412efdbb4179a3d9255'/>
<id>urn:sha1:1304a7343b30fc4f16045412efdbb4179a3d9255</id>
<content type='text'>
</content>
</entry>
<entry>
<title>af_packet: don't emit packet on orig fanout group</title>
<updated>2012-08-20T09:37:29Z</updated>
<author>
<name>Eric Leblond</name>
<email>eric@regit.org</email>
</author>
<published>2012-08-16T22:02:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c0de08d04215031d68fa13af36f347a6cfa252ca'/>
<id>urn:sha1:c0de08d04215031d68fa13af36f347a6cfa252ca</id>
<content type='text'>
If a packet is emitted on one socket in one group of fanout sockets,
it is transmitted again. It is thus read again on one of the sockets
of the fanout group. This result in a loop for software which
generate packets when receiving one.
This retransmission is not the intended behavior: a fanout group
must behave like a single socket. The packet should not be
transmitted on a socket if it originates from a socket belonging
to the same fanout group.

This patch fixes the issue by changing the transmission check to
take fanout group info account.

Reported-by: Aleksandr Kotov &lt;a1k@mail.ru&gt;
Signed-off-by: Eric Leblond &lt;eric@regit.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>packet: Report fanout status via diag engine</title>
<updated>2012-08-20T09:23:14Z</updated>
<author>
<name>Pavel Emelyanov</name>
<email>xemul@parallels.com</email>
</author>
<published>2012-08-16T05:36:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fff3321d75b1a18231876a1aceb36eacbbf6221e'/>
<id>urn:sha1:fff3321d75b1a18231876a1aceb36eacbbf6221e</id>
<content type='text'>
Reported value is the same reported by the FANOUT getsockoption, but
unlike it, the absent fanout setup results in absent nlattr, rather
than in nlattr with zero value. This is done so, since zero fanout
report may mean both -- no fanout, and fanout with both id and type zero.

Signed-off-by: Pavel Emelyanov &lt;xemul@parallels.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>packet: Report rings cfg via diag engine</title>
<updated>2012-08-20T09:23:14Z</updated>
<author>
<name>Pavel Emelyanov</name>
<email>xemul@parallels.com</email>
</author>
<published>2012-08-16T05:34:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=16f01365fa01150bf3606fe702a80a03ec87953a'/>
<id>urn:sha1:16f01365fa01150bf3606fe702a80a03ec87953a</id>
<content type='text'>
One extension bit may result in two nlattrs -- one per ring type.
If some ring type is not configured, then the respective nlatts
will be empty.

The structure reported contains the data, that is given to the
corresponding ring setup socket option.

Signed-off-by: Pavel Emelyanov &lt;xemul@parallels.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
