Repository navigation
Commit f89b0d0
net: hso: add failure handler for add_net_device
[ Upstream commit ecdc28d ]
If the network devices connected to the system beyond
HSO_MAX_NET_DEVICES. add_net_device() in hso_create_net_device()
will be failed for the network_table is full. It will lead to
business failure which rely on network_table, for example,
hso_suspend() and hso_resume(). It will also lead to memory leak
because resource release process can not search the hso_device
object from network_table in hso_free_interface().
Add failure handler for add_net_device() in hso_create_net_device()
to solve the above problems.
Fixes: 72dc1c0 ("HSO: add option hso driver")
Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent f450958 commit f89b0d0
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2537 | 2537 | | |
2538 | 2538 | | |
2539 | 2539 | | |
2540 | | - | |
| 2540 | + | |
| 2541 | + | |
| 2542 | + | |
| 2543 | + | |
| 2544 | + | |
2541 | 2545 | | |
2542 | 2546 | | |
2543 | 2547 | | |
2544 | 2548 | | |
2545 | 2549 | | |
2546 | | - | |
| 2550 | + | |
2547 | 2551 | | |
2548 | 2552 | | |
2549 | 2553 | | |
| |||
2552 | 2556 | | |
2553 | 2557 | | |
2554 | 2558 | | |
2555 | | - | |
| 2559 | + | |
2556 | 2560 | | |
| 2561 | + | |
2557 | 2562 | | |
2558 | 2563 | | |
2559 | 2564 | | |
| |||
0 commit comments