提交 11513128 编写于 作者: J Jeff Moyer 提交者: David S. Miller

[NETPOLL]: rx_flags bugfix

Initialize npinfo->rx_flags.  The way it stands now, this will have random
garbage, and so will incur a locking penalty even when an rx_hook isn't
registered and we are not active in the netpoll polling code.
Signed-off-by: NJeff Moyer <jmoyer@redhat.com>
Signed-off-by: NMatt Mackall <mpm@selenic.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a0d3bea3
......@@ -639,6 +639,7 @@ int netpoll_setup(struct netpoll *np)
if (!npinfo)
goto release;
npinfo->rx_flags = 0;
npinfo->rx_np = NULL;
npinfo->poll_lock = SPIN_LOCK_UNLOCKED;
npinfo->poll_owner = -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册