]> git.baikalelectronics.ru Git - kernel.git/commit
net: devlink: add port type spinlock
authorJiri Pirko <jiri@mellanox.com>
Sun, 24 Mar 2019 10:14:37 +0000 (11:14 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 24 Mar 2019 18:55:31 +0000 (14:55 -0400)
commite689018e0bc8b0fdc559adf64e83f2abc98ca2e9
treeb53eda2346f5ff0bac3b5810a3321d8d6ba27ab3
parente2731ce0788593f0c794e4441177b1c9a2b620f5
net: devlink: add port type spinlock

Add spinlock to protect port type and type_dev pointer consistency.
Without that, userspace may see inconsistent type and type_dev
combinations.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
v1->v2:
- rebased
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/devlink.h
net/core/devlink.c