Commit 8b36209
USB: serial: garmin_gps: fix I/O after failed probe and remove
commit 19a565d9af6e0d828bd0d521d3bafd5017f4ce52 upstream.
Make sure to stop any submitted interrupt and bulk-out URBs before
returning after failed probe and when the port is being unbound to avoid
later NULL-pointer dereferences in the completion callbacks.
Also fix up the related and broken I/O cancellation on failed open and
on close. (Note that port->write_urb was never submitted.)
Fixes: 1da177e ("Linux-2.6.12-rc2")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 5cd9385 commit 8b36209
1 file changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| |||
906 | 907 | | |
907 | 908 | | |
908 | 909 | | |
909 | | - | |
| 910 | + | |
910 | 911 | | |
911 | 912 | | |
912 | 913 | | |
913 | 914 | | |
914 | 915 | | |
915 | 916 | | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
916 | 923 | | |
917 | 924 | | |
918 | 925 | | |
| |||
931 | 938 | | |
932 | 939 | | |
933 | 940 | | |
934 | | - | |
935 | 941 | | |
936 | 942 | | |
937 | 943 | | |
| |||
954 | 960 | | |
955 | 961 | | |
956 | 962 | | |
957 | | - | |
| 963 | + | |
958 | 964 | | |
959 | 965 | | |
960 | 966 | | |
| |||
1038 | 1044 | | |
1039 | 1045 | | |
1040 | 1046 | | |
| 1047 | + | |
1041 | 1048 | | |
1042 | 1049 | | |
1043 | 1050 | | |
1044 | 1051 | | |
1045 | 1052 | | |
1046 | 1053 | | |
| 1054 | + | |
1047 | 1055 | | |
1048 | 1056 | | |
1049 | 1057 | | |
| |||
1402 | 1410 | | |
1403 | 1411 | | |
1404 | 1412 | | |
| 1413 | + | |
1405 | 1414 | | |
1406 | 1415 | | |
1407 | 1416 | | |
| |||
1414 | 1423 | | |
1415 | 1424 | | |
1416 | 1425 | | |
| 1426 | + | |
1417 | 1427 | | |
1418 | 1428 | | |
1419 | 1429 | | |
| |||
0 commit comments