Skip to content

Commit

Permalink
net/core: __hw_addr_create_ex does not initialize sync_cnt
Browse files Browse the repository at this point in the history
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 <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>
  • Loading branch information
Jay Vosburgh authored and David S. Miller committed May 31, 2013
1 parent fda3f40 commit 9747ba6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/core/dev_addr_lists.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ static int __hw_addr_create_ex(struct netdev_hw_addr_list *list,
ha->refcount = 1;
ha->global_use = global;
ha->synced = sync;
ha->sync_cnt = 0;
list_add_tail_rcu(&ha->list, &list->list);
list->count++;

Expand Down

0 comments on commit 9747ba6

Please sign in to comment.