Repository navigation
Commit ecdc28d
net: hso: add failure handler for add_net_device
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>1 parent b9edbfe commit ecdc28d
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2535 | 2535 | | |
2536 | 2536 | | |
2537 | 2537 | | |
2538 | | - | |
| 2538 | + | |
| 2539 | + | |
| 2540 | + | |
| 2541 | + | |
| 2542 | + | |
2539 | 2543 | | |
2540 | 2544 | | |
2541 | 2545 | | |
2542 | 2546 | | |
2543 | 2547 | | |
2544 | | - | |
| 2548 | + | |
2545 | 2549 | | |
2546 | 2550 | | |
2547 | 2551 | | |
| |||
2550 | 2554 | | |
2551 | 2555 | | |
2552 | 2556 | | |
2553 | | - | |
| 2557 | + | |
2554 | 2558 | | |
| 2559 | + | |
2555 | 2560 | | |
2556 | 2561 | | |
2557 | 2562 | | |
| |||
0 commit comments