Wang Hai
ba2582cd7f
net: bridge: Fix a warning when del bridge sysfs
...
[ Upstream commit 989a1db06eb18ff605377eec87e18d795e0ec74b ]
I got a warining report:
br_sysfs_addbr: can't create group bridge4/bridge
------------[ cut here ]------------
sysfs group 'bridge' not found for kobject 'bridge4'
WARNING: CPU: 2 PID: 9004 at fs/sysfs/group.c:279 sysfs_remove_group fs/sysfs/group.c:279 [inline]
WARNING: CPU: 2 PID: 9004 at fs/sysfs/group.c:279 sysfs_remove_group+0x153/0x1b0 fs/sysfs/group.c:270
Modules linked in: iptable_nat
...
Call Trace:
br_dev_delete+0x112/0x190 net/bridge/br_if.c:384
br_dev_newlink net/bridge/br_netlink.c:1381 [inline]
br_dev_newlink+0xdb/0x100 net/bridge/br_netlink.c:1362
__rtnl_newlink+0xe11/0x13f0 net/core/rtnetlink.c:3441
rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3500
rtnetlink_rcv_msg+0x385/0x980 net/core/rtnetlink.c:5562
netlink_rcv_skb+0x134/0x3d0 net/netlink/af_netlink.c:2494
netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline]
netlink_unicast+0x4a0/0x6a0 net/netlink/af_netlink.c:1330
netlink_sendmsg+0x793/0xc80 net/netlink/af_netlink.c:1919
sock_sendmsg_nosec net/socket.c:651 [inline]
sock_sendmsg+0x139/0x170 net/socket.c:671
____sys_sendmsg+0x658/0x7d0 net/socket.c:2353
___sys_sendmsg+0xf8/0x170 net/socket.c:2407
__sys_sendmsg+0xd3/0x190 net/socket.c:2440
do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9
In br_device_event(), if the bridge sysfs fails to be added,
br_device_event() should return error. This can prevent warining
when removing bridge sysfs that do not exist.
Fixes: bb900b27a2f4 ("bridge: allow creating bridge devices with netlink")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Tested-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Link: https://lore.kernel.org/r/20201211122921.40386-1-wanghai38@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-02-23 15:53:23 +01:00
..
2020-10-20 13:54:53 +02:00
2020-09-28 15:00:15 -07:00
2020-12-07 17:14:43 -08:00
2020-09-28 12:47:43 -07:00
2020-09-23 13:24:35 -07:00
2020-05-10 19:52:33 -07:00
2020-05-10 19:52:33 -07:00
2020-09-18 14:12:43 -07:00
2020-09-23 13:24:34 -07:00
2020-07-14 13:46:43 -07:00
2021-02-17 11:02:29 +01:00
2021-02-17 11:02:29 +01:00
2020-12-07 17:14:43 -08:00
2020-11-28 11:46:51 -08:00
2019-06-25 01:32:59 +02:00
2020-07-12 15:18:24 -07:00
2020-10-08 15:44:50 -07:00
2019-12-24 22:28:54 -08:00
2021-02-17 11:02:29 +01:00
2019-05-30 11:26:32 -07:00
2020-03-17 22:47:12 -07:00
2020-12-07 17:14:43 -08:00
2019-12-14 20:02:36 -08:00
2020-05-07 17:56:14 -07:00
2019-05-30 11:26:32 -07:00
2020-04-27 11:40:25 -07:00
2019-10-29 18:12:49 -07:00
2020-04-27 11:40:25 -07:00
2019-05-30 11:26:32 -07:00
2020-03-20 08:52:20 -07:00
2020-03-17 22:47:12 -07:00
2020-12-04 15:41:06 -08:00
2021-02-23 15:53:23 +01:00
2020-06-14 01:57:21 +09:00
2020-04-27 11:40:25 -07:00