提交 9747ba66 编写于 作者: J Jay Vosburgh 提交者: David S. Miller

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: NJay Vosburgh <fubar@us.ibm.com>
Reviewed-by: NVlad Yasevich <vyasevic@redhat.com>
Tested-by: NShawn Bohrer <sbohrer@rgmadvisors.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 fda3f402
......@@ -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++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册