Skip to content

Commit 9747ba6

Browse files
Jay Vosburghdavem330
authored andcommitted
net/core: __hw_addr_create_ex does not initialize sync_cnt
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>
1 parent fda3f40 commit 9747ba6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎net/core/dev_addr_lists.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ static int __hw_addr_create_ex(struct netdev_hw_addr_list *list,
3939
ha->refcount = 1;
4040
ha->global_use = global;
4141
ha->synced = sync;
42+
ha->sync_cnt = 0;
4243
list_add_tail_rcu(&ha->list, &list->list);
4344
list->count++;
4445

0 commit comments

Comments
 (0)