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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Vitaly Kuznetsov [mailto:vkuznets@xxxxxxxxxx]
> Sent: Thursday, August 11, 2016 6:59 AM
> To: netdev@xxxxxxxxxxxxxxx
> Cc: devel@xxxxxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Haiyang
> Zhang <haiyangz@xxxxxxxxxxxxx>; KY Srinivasan <kys@xxxxxxxxxxxxx>
> 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@xxxxxxxxxx>

Acked-by: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux