igb_uio: fix refcount if open returns error
authorStephen Hemminger <stephen@networkplumber.org>
Fri, 14 Sep 2018 15:30:19 +0000 (08:30 -0700)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 11 Oct 2018 11:47:19 +0000 (13:47 +0200)
commitab856f2947ef0af523eb4d22f4aa8347bbf07391
tree842cbdb445534153c858c8b354f791550a4b9105
parent8e1fdcaa3d76bd531d03897c9dfef0f6dc76c7c8
igb_uio: fix refcount if open returns error

This fixes the problem of reference count leak if
igbuio_pci_enable_interrupts fails.

Also, replace mutex and integer with a kernel atomic counter.
This is standard pattern for kernel devices.

Fixes: 19685d5aa79c ("igb_uio: allow multi-process access")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
kernel/linux/igb_uio/igb_uio.c