Commit 31cce4c
usb: gadget: mv_u3d: request_irq() after initializing UDC
BugLink: https://bugs.launchpad.net/bugs/1946788
[ Upstream commit 2af0c5f ]
If IRQ occurs between calling request_irq() and mv_u3d_eps_init(),
then null pointer dereference occurs since u3d->eps[] wasn't
initialized yet but used in mv_u3d_nuke().
The patch puts registration of the interrupt handler after
initializing of neccesery data.
Found by Linux Driver Verification project (linuxtesting.org).
Fixes: 90fccb5 ("usb: gadget: Gadget directory cleanup - group UDC drivers")
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Nadezda Lutovinova <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Kamal Mostafa <[email protected]>
Signed-off-by: Kelsey Skunberg <[email protected]>1 parent d788007 commit 31cce4c
1 file changed
+10
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1921 | 1921 | | |
1922 | 1922 | | |
1923 | 1923 | | |
1924 | | - | |
1925 | | - | |
1926 | | - | |
1927 | | - | |
1928 | | - | |
1929 | | - | |
1930 | | - | |
1931 | | - | |
1932 | 1924 | | |
1933 | 1925 | | |
1934 | 1926 | | |
| |||
1941 | 1933 | | |
1942 | 1934 | | |
1943 | 1935 | | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
1944 | 1945 | | |
1945 | 1946 | | |
1946 | 1947 | | |
| |||
1964 | 1965 | | |
1965 | 1966 | | |
1966 | 1967 | | |
1967 | | - | |
1968 | 1968 | | |
| 1969 | + | |
1969 | 1970 | | |
1970 | 1971 | | |
1971 | 1972 | | |
| |||
0 commit comments