Commit 60d671d
net-sysfs: Call dev_hold always in netdev_queue_add_kobject
[ Upstream commit e0b6090 ]
Dev_hold has to be called always in netdev_queue_add_kobject.
Otherwise usage count drops below 0 in case of failure in
kobject_init_and_add.
Fixes: b8eb718 ("net-sysfs: Fix reference count leak in rx|netdev_queue_add_kobject")
Reported-by: Hulk Robot <hulkci@huawei.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: David Miller <davem@davemloft.net>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 465b10f commit 60d671d
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1462 | 1462 | | |
1463 | 1463 | | |
1464 | 1464 | | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
1465 | 1470 | | |
1466 | 1471 | | |
1467 | 1472 | | |
1468 | 1473 | | |
1469 | 1474 | | |
1470 | 1475 | | |
1471 | | - | |
1472 | | - | |
1473 | 1476 | | |
1474 | 1477 | | |
1475 | 1478 | | |
| |||
0 commit comments