Skip to content

Commit 60ba834

Browse files
Jay Vosburghdavem330
authored andcommitted
net/core: __hw_addr_unsync_one "from" address not marked synced
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 <fubar@us.ibm.com> Reviewed-by: Vlad Yasevich <vyasevic@redhat.com> Tested-by: Shawn Bohrer <sbohrer@rgmadvisors.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 9747ba6 commit 60ba834

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎net/core/dev_addr_lists.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ static void __hw_addr_unsync_one(struct netdev_hw_addr_list *to_list,
160160
if (err)
161161
return;
162162
ha->sync_cnt--;
163-
__hw_addr_del_entry(from_list, ha, false, true);
163+
/* address on from list is not marked synced */
164+
__hw_addr_del_entry(from_list, ha, false, false);
164165
}
165166

166167
static int __hw_addr_sync_multiple(struct netdev_hw_addr_list *to_list,

0 commit comments

Comments
 (0)