Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
414ca09c
Commit
414ca09c
authored
Nov 30, 2002
by
Oliver Neukum
Committed by
Greg Kroah-Hartman
Nov 30, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB core: cleanup BKL
parent
439683c2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
drivers/usb/core/devio.c
drivers/usb/core/devio.c
+8
-8
No files found.
drivers/usb/core/devio.c
View file @
414ca09c
...
...
@@ -1090,12 +1090,10 @@ static int proc_ioctl (struct dev_state *ps, void *arg)
else
switch
(
ctrl
.
ioctl_code
)
{
/* disconnect kernel driver from interface, leaving it unbound. */
/* maybe unbound - you get no guarantee it stays unbound */
case
USBDEVFS_DISCONNECT
:
/* this function is voodoo. */
/* which function ... usb_device_remove()?
* FIXME either the module lock (BKL) should be involved
* here too, or the 'default' case below is broken
*/
/* this function is misdesigned - retained for compatibility */
lock_kernel
();
driver
=
ifp
->
driver
;
if
(
driver
)
{
dbg
(
"disconnect '%s' from dev %d interface %d"
,
...
...
@@ -1103,11 +1101,14 @@ static int proc_ioctl (struct dev_state *ps, void *arg)
usb_device_remove
(
&
ifp
->
dev
);
}
else
retval
=
-
ENODATA
;
unlock_kernel
();
break
;
/* let kernel drivers try to (re)bind to the interface */
case
USBDEVFS_CONNECT
:
lock_kernel
();
retval
=
usb_device_probe
(
&
ifp
->
dev
);
unlock_kernel
();
break
;
/* talk directly to the interface's driver */
...
...
@@ -1129,11 +1130,10 @@ static int proc_ioctl (struct dev_state *ps, void *arg)
}
unlock_kernel
();
retval
=
driver
->
ioctl
(
ifp
,
ctrl
.
ioctl_code
,
buf
);
module_put
(
driver
->
owner
);
}
if
(
retval
==
-
ENOIOCTLCMD
)
retval
=
-
ENOTTY
;
module_put
(
driver
->
owner
);
}
}
/* cleanup and return */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment