netdev: Safely increment refcount in netdev_open().
authorJoe Stringer <joestringer@nicira.com>
Thu, 1 May 2014 23:55:05 +0000 (11:55 +1200)
committerJoe Stringer <joestringer@nicira.com>
Mon, 5 May 2014 00:20:48 +0000 (12:20 +1200)
commite47d369096ddb43a43b070385de41be9dfe6c703
treeda19445174c52077c5226ac77ae26187588724c7
parentc3bbaa66ed7167a062d397b8e7977cdefbaf87d5
netdev: Safely increment refcount in netdev_open().

netdev_open() would previously increment a netdev's refcount without
holding a lock for it. This commit shifts the locking to protect it.

Found by inspection.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
lib/netdev.c