#
d4ead16f |
| 22-May-2007 |
Alan Stern <stern@rowland.harvard.edu> |
USB: prevent char device open/deregister race
This patch (as908) adds central protection in usbcore for the prototypical race between opening and unregistering a char device. The spinlock used to pr
USB: prevent char device open/deregister race
This patch (as908) adds central protection in usbcore for the prototypical race between opening and unregistering a char device. The spinlock used to protect the minor-numbers array is replaced with an rwsem, which can remain locked across a call to a driver's open() method. This guarantees that open() and deregister() will be mutually exclusive.
The private locks currently used in several individual drivers for this purpose are no longer necessary, and the patch removes them. The following USB drivers are affected: usblcd, idmouse, auerswald, legousbtower, sisusbvga/sisusb, ldusb, adutux, iowarrior, and usb-skeleton.
As a side effect of this change, usb_deregister_dev() must not be called while holding a lock that is acquired by open(). Unfortunately a number of drivers do this, but luckily the solution is simple: call usb_deregister_dev() before acquiring the lock.
In addition to these changes (and their consequent code simplifications), the patch fixes a use-after-free bug in adutux and a race between open() and release() in iowarrior.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
show more ...
|
Revision tags: v2.6.22-rc2, v2.6.22-rc1 |
|
#
48a7afe3 |
| 01-May-2007 |
Wim Van Sebroeck <wim@iguana.be> |
Merge /pub/scm/linux/kernel/git/torvalds/linux-2.6
|
#
bc95f366 |
| 30-Apr-2007 |
Dmitry Torokhov <dtor@insightbb.com> |
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/usb/input/Makefile drivers/usb/input/gtco.c
|
#
49e1900d |
| 29-Apr-2007 |
Paul Mackerras <paulus@samba.org> |
Merge branch 'linux-2.6' into for-2.6.22
|
#
50f732ee |
| 27-Apr-2007 |
Linus Torvalds <torvalds@woody.linux-foundation.org> |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (78 commits) USB: update MAINAINERS and CREDITS for Freescale USB dri
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (78 commits) USB: update MAINAINERS and CREDITS for Freescale USB driver USB: update gadget files for fsl_usb2_udc driver USB: add Freescale high-speed USB SOC device controller driver USB: quirk for broken suspend of IT8152F/G USB: iowarrior.c: timeouts too small in usb_control_msg calls USB: dell device id for option.c USB: Remove Huawei unusual_devs entry USB: CP2101 New Device IDs USB: add picdem device to ldusb usbfs micro optimitation USB: remove ancient/broken CRIS hcd usb ethernet gadget, workaround network stack API glitch USB: add "busnum" attribute for USB devices USB: cxacru: ADSL state management usbatm: Detect usb device shutdown and ignore failed urbs USB: Remove duplicate define of OHCI_QUIRK_ZFMICRO USB: BandRich BandLuxe HSDPA Data Card Driver USB gadget rndis: fix struct rndis_packet_msg_type unaligned bug USB Elan FTDI: check for driver registration status USB: sierra: add more checks on shutdown ...
show more ...
|
Revision tags: v2.6.21, v2.6.21-rc7, v2.6.21-rc6, v2.6.21-rc5, v2.6.21-rc4, v2.6.21-rc3 |
|
#
5d9b89b3 |
| 01-Mar-2007 |
Oliver Neukum <oneukum@suse.de> |
USB: kill BKL in skeleton driver
Iet's kill BKL where we can. This is relative to the last patch to the skeleton driver.
Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Har
USB: kill BKL in skeleton driver
Iet's kill BKL where we can. This is relative to the last patch to the skeleton driver.
Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
show more ...
|
#
ba35e02b |
| 01-Mar-2007 |
Oliver Neukum <oneukum@suse.de> |
USB: fix skeleton driver
compilation of the skeleton driver is currently broken. It doesn't compile. So while I am it:
- fix typo - add comments to answer common questions - actually allow autosusp
USB: fix skeleton driver
compilation of the skeleton driver is currently broken. It doesn't compile. So while I am it:
- fix typo - add comments to answer common questions - actually allow autosuspend in the driver struct - increase paralellism by restricting code under locks
Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
show more ...
|
Revision tags: v2.6.21-rc2, v2.6.21-rc1 |
|
#
5a84d159 |
| 20-Feb-2007 |
Russell King <rmk@dyn-67.arm.linux.org.uk> |
Merge ARM fixes
|
#
460223d2 |
| 19-Feb-2007 |
Linus Torvalds <torvalds@woody.linux-foundation.org> |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (39 commits) USB: at91-ohci, handle extra at91sam9261 ahb clock USB
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (39 commits) USB: at91-ohci, handle extra at91sam9261 ahb clock USB: another id for cp2101 driver USB: ueagle-atm.c needs sched.h USB: at91_udc, shrink runtime footprint usbnet: add missing Kconfig for KC2190 cables usbnet: init fault (oops) cleanup, whitespace fixes usbnet: recognize SiteCom CN-124 usb: Remove Airprime device from option.c USB: change __init to __devinit for isp116x_probe USB: ps3: don't call ps3_system_bus_driver_register on other platforms USB: hid-core.c: Removes GTCO CalComp Interwrite IPanel PIDs from blacklist USB: kernel-doc fixes USB: quirky device for cdc-acm USB: cdc-acm: fix incorrect throtteling, make set_control optional USB: unconfigure devices which have config 0 USB: make usb_iso_packet_descriptor.status signed USB: fix g_serial small error USB: use __u32 rather than u32 in userspace ioctls in usbdevice_fs.h USB Storage: US_FL_IGNORE_RESIDUE needed for Aiptek MP3 Player USB: Fix misspelled "USBNET_MII" kernel config option. ...
show more ...
|
#
5b064708 |
| 08-Feb-2007 |
Oliver Neukum <oneukum@suse.de> |
USB: fix autosuspend race in skeleton driver
as the skeleton driver was made ready for autosuspend a race condition was introduced. The reference to get device must be gotten before the autosuspend
USB: fix autosuspend race in skeleton driver
as the skeleton driver was made ready for autosuspend a race condition was introduced. The reference to get device must be gotten before the autosuspend counter is upped, as this operation may sleep, dropping BKL. Dropping BKL means that the pointer to the device may become invalid. Here's the fix.
Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
show more ...
|
Revision tags: v2.6.20, v2.6.20-rc7, v2.6.20-rc6, v2.6.20-rc5, v2.6.20-rc4, v2.6.20-rc3, v2.6.20-rc2, v2.6.20-rc1 |
|
#
f0eef253 |
| 12-Dec-2006 |
Dave Jones <davej@redhat.com> |
Merge ../linus
|
Revision tags: v2.6.19, v2.6.19-rc6, v2.6.19-rc5, v2.6.19-rc4, v2.6.19-rc3 |
|
#
513b046c |
| 21-Oct-2006 |
David Woodhouse <dwmw2@infradead.org> |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
|
Revision tags: v2.6.19-rc2 |
|
#
24fcbace |
| 11-Oct-2006 |
Jeff Garzik <jeff@garzik.org> |
Merge branch 'master' into upstream-fixes
|
#
4ad99f15 |
| 05-Oct-2006 |
Jeff Garzik <jeff@garzik.org> |
Merge branch 'master' into upstream-fixes
|
#
44aefd27 |
| 05-Oct-2006 |
Linus Torvalds <torvalds@g5.osdl.org> |
Merge git://git.infradead.org/~dhowells/irq-2.6
* git://git.infradead.org/~dhowells/irq-2.6: IRQ: Maintain regs pointer globally rather than passing to IRQ handlers IRQ: Typedef the IRQ handler
Merge git://git.infradead.org/~dhowells/irq-2.6
* git://git.infradead.org/~dhowells/irq-2.6: IRQ: Maintain regs pointer globally rather than passing to IRQ handlers IRQ: Typedef the IRQ handler function type IRQ: Typedef the IRQ flow handler function type
show more ...
|
#
7d12e780 |
| 05-Oct-2006 |
David Howells <dhowells@redhat.com> |
IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1
IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel.
The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()).
Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling.
Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing.
I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations.
This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
struct pt_regs *old_regs = set_irq_regs(regs);
And put the old one back at the end:
set_irq_regs(old_regs);
Don't pass regs through to generic_handle_irq() or __do_IRQ().
In timer_interrupt(), this sort of change will be necessary:
- update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING);
I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode().
Some notes on the interrupt handling in the drivers:
(*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct.
(*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not.
(*) Various IRQ handler function pointers have been moved to type irq_handler_t.
Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
show more ...
|
Revision tags: v2.6.19-rc1 |
|
#
8a84fc15 |
| 01-Oct-2006 |
David Woodhouse <dwmw2@infradead.org> |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Manually resolve conflict in include/mtd/Kbuild
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
|
#
185a257f |
| 28-Sep-2006 |
Steven Whitehouse <swhiteho@redhat.com> |
Merge branch 'master' into gfs2
|
#
3b9f6cb8 |
| 27-Sep-2006 |
Jeff Garzik <jeff@garzik.org> |
Merge branch 'master' into upstream
|
#
aebb1153 |
| 27-Sep-2006 |
Jeff Garzik <jeff@garzik.org> |
Merge branch 'master' into upstream
|
#
1f9bd4c9 |
| 27-Sep-2006 |
Linus Torvalds <torvalds@g5.osdl.org> |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (129 commits) [PATCH] USB Storage: fix Rio Karma eject support build
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (129 commits) [PATCH] USB Storage: fix Rio Karma eject support build error USB: Airprime driver improvements to allow full speed EvDO transfers USB: remove OTG build warning USB: EHCI update VIA workaround USB: force root hub resume after power loss USB: ohci_usb can oops on shutdown USB: Dealias -110 code (more complete) USB: Remove unneeded void * casts in core files USB: u132-hcd: host controller driver for ELAN U132 adapter USB: ftdi-elan: client driver for ELAN Uxxx adapters usb serial: support Alcor Micro Corp. USB 2.0 TO RS-232 through pl2303 driver USB: Moschip 7840 USB-Serial Driver USB: add PlayStation 2 Trance Vibrator driver USB: Add ADU support for Ontrak ADU devices aircable: fix printk format warnings Add AIRcable USB Bluetooth Dongle Driver cypress_m8: implement graceful failure handling cypress_m8: improve control endpoint error handling cypress_m8: use usb_fill_int_urb where appropriate cypress_m8: use appropriate URB polling interval ...
show more ...
|
Revision tags: v2.6.18, v2.6.18-rc7, v2.6.18-rc6 |
|
#
01d883d4 |
| 30-Aug-2006 |
Alan Stern <stern@rowland.harvard.edu> |
usbcore: non-hub-specific uses of autosuspend
This patch (as741) makes the non-hub parts of usbcore actually use the autosuspend facilities added by an earlier patch.
Devices opened through usbfs
usbcore: non-hub-specific uses of autosuspend
This patch (as741) makes the non-hub parts of usbcore actually use the autosuspend facilities added by an earlier patch.
Devices opened through usbfs are autoresumed and then autosuspended upon close.
Likewise for usb-skeleton.
Devices are autoresumed for usb_set_configuration.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
show more ...
|
Revision tags: v2.6.18-rc5 |
|
#
c0704541 |
| 14-Aug-2006 |
Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> |
usb-skeleton: small update
o CodingStyle fixes o Removes trailing spaces o Do not make not needed initialiation of automatic variables o Use usb_endpoint_* functions o If we get an error in the writ
usb-skeleton: small update
o CodingStyle fixes o Removes trailing spaces o Do not make not needed initialiation of automatic variables o Use usb_endpoint_* functions o If we get an error in the write URB callback print an error message instead of a debug one
(Pretty unrelated changes, but spliting this up doesn't pay off as our main changes are just CodingStyle fixes).
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
show more ...
|
Revision tags: v2.6.18-rc4 |
|
#
066202dd |
| 05-Aug-2006 |
Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> |
USB: Make file operations structs in drivers/usb const.
Making structs const prevents accidental bugs and with the proper debug options they're protected against corruption.
Signed-off-by: Luiz Fer
USB: Make file operations structs in drivers/usb const.
Making structs const prevents accidental bugs and with the proper debug options they're protected against corruption.
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
show more ...
|
Revision tags: v2.6.18-rc3, v2.6.18-rc2, v2.6.18-rc1 |
|
#
121e287c |
| 01-Jul-2006 |
Alan Stern <stern@rowland.harvard.edu> |
usb-skeleton: don't submit URBs after disconnection
This patch (as712b) is a slight revision of one submitted earlier. It fixes the usb-skeleton example driver so that it won't try to submit URBs a
usb-skeleton: don't submit URBs after disconnection
This patch (as712b) is a slight revision of one submitted earlier. It fixes the usb-skeleton example driver so that it won't try to submit URBs after skel_disconnect() has returned. This could cause errors, if the driver was unbound and then a different driver was bound to the device. It also fixes a couple of small bugs in the skel_write() routine.
The revised patch uses a slightly different test, suggested by Dave Brownell, for determining whether to free a transfer buffer. It's a little clearer than the earlier version.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
show more ...
|