Thread (14 messages) flat view 14 messages, 5 authors, 2016-08-15

RE: [PATCH net 3/4] hv_netvsc: protect module refcount by checking net_device_ctx->vf_netdev

From: Haiyang Zhang <haiyangz@microsoft.com>
Date: 2016-08-11 16:09:58
Also in: lkml

-----Original Message-----
From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com]
Sent: Thursday, August 11, 2016 6:59 AM
To: netdev@vger.kernel.org
Cc: devel@linuxdriverproject.org; linux-kernel@vger.kernel.org; Haiyang
Zhang [off-list ref]; KY Srinivasan [off-list ref]
Subject: [PATCH net 3/4] hv_netvsc: protect module refcount by checking
net_device_ctx->vf_netdev

We're not guaranteed to see NETDEV_REGISTER/NETDEV_UNREGISTER
notifications
only once per VF but we increase/decrease module refcount unconditionally.
Check vf_netdev to make sure we don't take/release it twice. We presume
that only one VF per netvsc device may exist.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Acked-by: Haiyang Zhang <haiyangz@microsoft.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help