<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/core/dev_addr_lists.c, branch v3.12.10</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/core/dev_addr_lists.c?h=v3.12.10</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/core/dev_addr_lists.c?h=v3.12.10'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-05-31T23:56:56Z</updated>
<entry>
<title>net/core: dev_mc_sync_multiple calls wrong helper</title>
<updated>2013-05-31T23:56:56Z</updated>
<author>
<name>Jay Vosburgh</name>
<email>fubar@us.ibm.com</email>
</author>
<published>2013-05-31T11:57:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b190a50875b95e58ebe2b00ed3bf7f1d44961471'/>
<id>urn:sha1:b190a50875b95e58ebe2b00ed3bf7f1d44961471</id>
<content type='text'>
The dev_mc_sync_multiple function is currently calling
__hw_addr_sync, and not __hw_addr_sync_multiple.  This will result in
addresses only being synced to the first device from the set.

	Corrected by calling the _multiple variant.

Signed-off-by: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
Reviewed-by: Vlad Yasevich &lt;vyasevic@redhat.com&gt;
Tested-by: Shawn Bohrer &lt;sbohrer@rgmadvisors.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/core: __hw_addr_sync_one / _multiple broken</title>
<updated>2013-05-31T23:56:56Z</updated>
<author>
<name>Jay Vosburgh</name>
<email>fubar@us.ibm.com</email>
</author>
<published>2013-05-31T11:57:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=29ca2f8fcc721517b83d0a560c47cee2dde827a6'/>
<id>urn:sha1:29ca2f8fcc721517b83d0a560c47cee2dde827a6</id>
<content type='text'>
Currently, __hw_addr_sync_one is called in a loop by
__hw_addr_sync_multiple to sync each of a "from" device's hw addresses
to a "to" device.  __hw_addr_sync_one calls __hw_addr_add_ex to attempt
to add each address.  __hw_addr_add_ex is called with global=false, and
sync=true.

	__hw_addr_add_ex checks to see if the new address matches an
address already on the list.  If so, it tests global and sync.  In this
case, sync=true, and it then checks if the address is already synced,
and if so, returns 0.

	This 0 return causes __hw_addr_sync_one to increment the sync_cnt
and refcount for the "from" list's address entry, even though the address
is already synced and has a reference and sync_cnt.  This will cause
the sync_cnt and refcount to increment without bound every time an
addresses is added to the "from" device and synced to the "to" device.

	The fix here has two parts:

	First, when __hw_addr_add_ex finds the address already exists
and is synced, return -EEXIST instead of 0.

	Second, __hw_addr_sync_one checks the error return for -EEXIST,
and if so, it (a) does not add a refcount/sync_cnt, and (b) returns 0
itself so that __hw_addr_sync_multiple will not return an error.

Signed-off-by: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
Reviewed-by: Vlad Yasevich &lt;vyasevic@redhat.com&gt;
Tested-by: Shawn Bohrer &lt;sbohrer@rgmadvisors.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/core: __hw_addr_unsync_one "from" address not marked synced</title>
<updated>2013-05-31T23:56:56Z</updated>
<author>
<name>Jay Vosburgh</name>
<email>fubar@us.ibm.com</email>
</author>
<published>2013-05-31T11:57:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=60ba834c2fb65f2fafee47e03c258fac579d0591'/>
<id>urn:sha1:60ba834c2fb65f2fafee47e03c258fac579d0591</id>
<content type='text'>
When an address is added to a subordinate interface (the "to"
list), the address entry in the "from" list is not marked "synced" as
the entry added to the "to" list is.

	When performing the unsync operation (e.g., dev_mc_unsync),
__hw_addr_unsync_one calls __hw_addr_del_entry with the "synced"
parameter set to true for the case when the address reference is being
released from the "from" list.  This causes a test inside to fail,
with the result being that the reference count on the "from" address
is not properly decremeted and the address on the "from" list will
never be freed.

	Correct this by having __hw_addr_unsync_one call the
__hw_addr_del_entry function with the "sync" flag set to false for the
"remove from the from list" case.

Signed-off-by: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
Reviewed-by: Vlad Yasevich &lt;vyasevic@redhat.com&gt;
Tested-by: Shawn Bohrer &lt;sbohrer@rgmadvisors.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/core: __hw_addr_create_ex does not initialize sync_cnt</title>
<updated>2013-05-31T23:56:56Z</updated>
<author>
<name>Jay Vosburgh</name>
<email>fubar@us.ibm.com</email>
</author>
<published>2013-05-31T11:57:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9747ba6636be8a7e8ba83a1fb231d061ca318e4f'/>
<id>urn:sha1:9747ba6636be8a7e8ba83a1fb231d061ca318e4f</id>
<content type='text'>
The sync_cnt field is not being initialized, which can result
in arbitrary values in the field.  Fixed by initializing it to zero.

Signed-off-by: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
Reviewed-by: Vlad Yasevich &lt;vyasevic@redhat.com&gt;
Tested-by: Shawn Bohrer &lt;sbohrer@rgmadvisors.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: add dev_uc_sync_multiple() and dev_mc_sync_multiple() api</title>
<updated>2013-04-15T20:10:47Z</updated>
<author>
<name>Vlad Yasevich</name>
<email>vyasevic@redhat.com</email>
</author>
<published>2013-04-15T09:54:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4cd729b04285b7330edaf5a7080aa795d6d15ff3'/>
<id>urn:sha1:4cd729b04285b7330edaf5a7080aa795d6d15ff3</id>
<content type='text'>
The current implementation of dev_uc_sync/unsync() assumes that there is
a strict 1-to-1 relationship between the source and destination of the sync.
In other words, once an address has been synced to a destination device, it
will not be synced to any other device through the sync API.
However, there are some virtual devices that aggreate a number of lower
devices and need to sync addresses to all of them.  The current
API falls short there.

This patch introduces a new dev_uc_sync_multiple() api that can be called
in the above circumstances and allows sync to work for every invocation.

CC: Jiri Pirko &lt;jiri@resnulli.us&gt;
Signed-off-by: Vlad Yasevich &lt;vyasevic@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: count hw_addr syncs so that unsync works properly.</title>
<updated>2013-04-05T04:18:46Z</updated>
<author>
<name>Vlad Yasevich</name>
<email>vyasevic@redhat.com</email>
</author>
<published>2013-04-02T21:10:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4543fbefe6e06a9e40d9f2b28d688393a299f079'/>
<id>urn:sha1:4543fbefe6e06a9e40d9f2b28d688393a299f079</id>
<content type='text'>
A few drivers use dev_uc_sync/unsync to synchronize the
address lists from master down to slave/lower devices.  In
some cases (bond/team) a single address list is synched down
to multiple devices.  At the time of unsync, we have a leak
in these lower devices, because "synced" is treated as a
boolean and the address will not be unsynced for anything after
the first device/call.

Treat "synced" as a count (same as refcount) and allow all
unsync calls to work.

Signed-off-by: Vlad Yasevich &lt;vyasevic@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: move procfs code to net/core/net-procfs.c</title>
<updated>2013-02-19T05:51:10Z</updated>
<author>
<name>Cong Wang</name>
<email>xiyou.wangcong@gmail.com</email>
</author>
<published>2013-02-18T19:20:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=900ff8c6321418dafa03c22e215cb9646a2541b9'/>
<id>urn:sha1:900ff8c6321418dafa03c22e215cb9646a2541b9</id>
<content type='text'>
Similar to net/core/net-sysfs.c, group procfs code to
a single unit.

Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: proc: change proc_net_remove to remove_proc_entry</title>
<updated>2013-02-18T19:53:08Z</updated>
<author>
<name>Gao feng</name>
<email>gaofeng@cn.fujitsu.com</email>
</author>
<published>2013-02-18T01:34:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ece31ffd539e8e2b586b1ca5f50bc4f4591e3893'/>
<id>urn:sha1:ece31ffd539e8e2b586b1ca5f50bc4f4591e3893</id>
<content type='text'>
proc_net_remove is only used to remove proc entries
that under /proc/net,it's not a general function for
removing proc entries of netns. if we want to remove
some proc entries which under /proc/net/stat/, we still
need to call remove_proc_entry.

this patch use remove_proc_entry to replace proc_net_remove.
we can remove proc_net_remove after this patch.

Signed-off-by: Gao feng &lt;gaofeng@cn.fujitsu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: proc: change proc_net_fops_create to proc_create</title>
<updated>2013-02-18T19:53:08Z</updated>
<author>
<name>Gao feng</name>
<email>gaofeng@cn.fujitsu.com</email>
</author>
<published>2013-02-18T01:34:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d4beaa66add8aebf83ab16d2fde4e4de8dac36df'/>
<id>urn:sha1:d4beaa66add8aebf83ab16d2fde4e4de8dac36df</id>
<content type='text'>
Right now, some modules such as bonding use proc_create
to create proc entries under /proc/net/, and other modules
such as ipv4 use proc_net_fops_create.

It looks a little chaos.this patch changes all of
proc_net_fops_create to proc_create. we can remove
proc_net_fops_create after this patch.

Signed-off-by: Gao feng &lt;gaofeng@cn.fujitsu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: correct check in dev_addr_del()</title>
<updated>2012-11-15T22:57:53Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@resnulli.us</email>
</author>
<published>2012-11-14T02:51:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a652208e0b52c190e57f2a075ffb5e897fe31c3b'/>
<id>urn:sha1:a652208e0b52c190e57f2a075ffb5e897fe31c3b</id>
<content type='text'>
Check (ha-&gt;addr == dev-&gt;dev_addr) is always true because dev_addr_init()
sets this. Correct the check to behave properly on addr removal.

Signed-off-by: Jiri Pirko &lt;jiri@resnulli.us&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
