Commit a6ecfb3
usb: hso: fix error handling code of hso_create_net_device
The current error handling code of hso_create_net_device is
hso_free_net_device, no matter which errors lead to. For example,
WARNING in hso_free_net_device [1].
Fix this by refactoring the error handling code of
hso_create_net_device by handling different errors by different code.
[1] https://syzkaller.appspot.com/bug?id=66eff8d49af1b28370ad342787413e35bbe76efe
Reported-by: syzbot+44d53c7255bb1aea22d2@syzkaller.appspotmail.com
Fixes: 5fcfb6d ("hso: fix bailout in error case of probe")
Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 6206b79 commit a6ecfb3
1 file changed
+23
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2495 | 2495 | | |
2496 | 2496 | | |
2497 | 2497 | | |
2498 | | - | |
| 2498 | + | |
2499 | 2499 | | |
2500 | 2500 | | |
2501 | 2501 | | |
| |||
2508 | 2508 | | |
2509 | 2509 | | |
2510 | 2510 | | |
2511 | | - | |
| 2511 | + | |
2512 | 2512 | | |
2513 | 2513 | | |
2514 | 2514 | | |
2515 | 2515 | | |
2516 | 2516 | | |
2517 | | - | |
| 2517 | + | |
2518 | 2518 | | |
2519 | 2519 | | |
2520 | 2520 | | |
| |||
2523 | 2523 | | |
2524 | 2524 | | |
2525 | 2525 | | |
2526 | | - | |
| 2526 | + | |
2527 | 2527 | | |
2528 | 2528 | | |
2529 | 2529 | | |
2530 | | - | |
| 2530 | + | |
2531 | 2531 | | |
2532 | 2532 | | |
2533 | 2533 | | |
2534 | | - | |
| 2534 | + | |
2535 | 2535 | | |
2536 | 2536 | | |
2537 | | - | |
| 2537 | + | |
2538 | 2538 | | |
2539 | 2539 | | |
2540 | 2540 | | |
2541 | 2541 | | |
2542 | 2542 | | |
2543 | 2543 | | |
2544 | 2544 | | |
2545 | | - | |
| 2545 | + | |
2546 | 2546 | | |
2547 | 2547 | | |
2548 | 2548 | | |
2549 | 2549 | | |
2550 | 2550 | | |
2551 | 2551 | | |
2552 | 2552 | | |
2553 | | - | |
2554 | | - | |
| 2553 | + | |
| 2554 | + | |
| 2555 | + | |
| 2556 | + | |
| 2557 | + | |
| 2558 | + | |
| 2559 | + | |
| 2560 | + | |
| 2561 | + | |
| 2562 | + | |
| 2563 | + | |
| 2564 | + | |
| 2565 | + | |
| 2566 | + | |
| 2567 | + | |
2555 | 2568 | | |
2556 | 2569 | | |
2557 | 2570 | | |
| |||
0 commit comments