aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-06-04Minix: Clean up left over labelAndrew Hendry1-4/+0
Remove a left over fail label. Signed-off-by: Andrew Hendry <[email protected]> Signed-off-by: Al Viro <[email protected]>
2010-06-04fix truncate inode time modification breakageNick Piggin2-3/+4
mtime and ctime should be changed only if the file size has actually changed. Patches changing ext2 and tmpfs from vmtruncate to new truncate sequence has caused regressions where they always update timestamps. There is some strange cases in POSIX where truncate(2) must not update times unless the size has acutally changed, see 6e656be89. This area is all still rather buggy in different ways in a lot of filesystems and needs a cleanup and audit (ideally the vfs will provide a simple attribute or call to direct all filesystems exactly which attributes to change). But coming up with the best solution will take a while and is not appropriate for rc anyway. So fix recent regression for now. Signed-off-by: Nick Piggin <[email protected]> Signed-off-by: Al Viro <[email protected]>
2010-06-04fix setattr error handling in sysfs, configfsNick Piggin2-7/+8
sysfs and configfs setattr functions have error cases after the generic inode's attributes have been changed. Fix consistency by changing the generic inode attributes only when it is guaranteed to succeed. Signed-off-by: Nick Piggin <[email protected]> Signed-off-by: Al Viro <[email protected]>
2010-06-04fcntl: return -EFAULT if copy_to_user failsDan Carpenter1-2/+5
copy_to_user() returns the number of bytes remaining, but we want to return -EFAULT. ret = fcntl(fd, F_SETOWN_EX, NULL); With the original code ret would be 8 here. V2: Takuya Yoshikawa pointed out a similar issue in f_getown_ex() Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Al Viro <[email protected]>
2010-06-04wrong type for 'magic' argument in simple_fill_super()Roberto Sassu2-2/+3
It's used to superblock ->s_magic, which is unsigned long. Signed-off-by: Roberto Sassu <[email protected]> Reviewed-by: Mimi Zohar <[email protected]> Signed-off-by: Eric Paris <[email protected]> CC: [email protected] Signed-off-by: Al Viro <[email protected]>
2010-06-04fix the deadlock in qib_fsAl Viro1-3/+1
get_sb_single() calls fill_super with superblock locked; calling deactivate_super() will deadlock immedately. Moreover, if fill_super callback returns an error, get_sb_single() will release the reference to superblock itself just fine. Signed-off-by: Al Viro <[email protected]>
2010-06-04mqueue doesn't need make_bad_inode()Al Viro1-1/+0
It never hashes them anyway and does final iput() immediately afterwards. With ->drop_inode() being generic_delete_inode()... Signed-off-by: Al Viro <[email protected]>
2010-06-04Staging: sep: return -EFAULT on copy_to_user errorsDan Carpenter1-12/+40
copy_to_user() returns the number of bytes remaining but we want to return a negative error code here. These functions are used in the ioctl handler and the error code gets returned to userspace. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: rc2860: return -EFAULT on copy_to_user errorsDan Carpenter1-0/+2
copy_to_user() returns the number of bytes remaining but we want to return a negative error code. This is in the ioctl handler and the error code gets passed to userspace. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: Eliminate a NULL pointer dereferenceJulia Lawall2-5/+2
Eliminate a NULL or near NULL pointer dereference. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ expression E,E1; identifier f; statement S1,S2,S3; @@ if ((E == NULL && ...) || ...) { ... when != if (...) S1 else S2 when != E = E1 * E->f ... when any return ...; } else S3 // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04staging: Use GFP_ATOMIC when a lock is heldJulia Lawall3-3/+3
In each case, the containing function is only called from one place, where a spin lock is held. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @gfp exists@ identifier fn; position p; @@ fn(...) { ... when != spin_unlock when any GFP_KERNEL@p ... when any } @locked@ identifier gfp.fn; @@ spin_lock(...) ... when != spin_unlock fn(...) @depends on locked@ position gfp.p; @@ - GFP_KERNEL@p + GFP_ATOMIC // </smpl> Signed-off-by: Julia Lawall <[email protected]> Cc: Jonathan Cameron <[email protected]> Cc: Marek Lindner <[email protected]> Cc: Martyn Welch <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: comedi - correct parameter gainlkup for DAQCard-6024E in driver ↵Martin Homuth-Rosemann1-1/+1
ni_mio_cs.c Correct at least one of the incorrect specs for a national instrument data acquisition card DAQCard-6024E. This card has only four different gain settings (+-10V, +-5V, +-0.5V, +-0.05V). Signed-off-by: Martin Homuth-Rosemann <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: comedi: fixing ni_labpc to mite dependancyAlexander Kurz1-0/+1
the dependancy of ni_labpc on mite was missing, Signed-off-by: Alexander Kurz <[email protected]> Acked-by: Randy Dunlap <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> index 0aa2b0d..79f5f2e 100644
2010-06-04Staging: wlags49_h2, wlags49_h25: fixed Kconfig dependenciesHenk de Groot2-10/+14
Fixes Kconfig so the wlags49_h2 and wlags49_h25 drivers can be selected from menuconfig without having to select another WLAN driver first. Before it could only be selected when another driver already selected WIRELESS_EXT. Also adds WEXT_PRIV on which the driver also depends. Align help text in Kconfig. Signed-off-by: Henk de Groot <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: phison: depends on ATA_BMDMARandy Dunlap1-1/+1
phison uses interfaces and data that are built only when ATA_BMDMA is enabled, so it should depend on that symbol. drivers/staging/phison/phison.c:43: error: implicit declaration of function 'ATA_BMDMA_SHT' drivers/staging/phison/phison.c:43: error: initializer element is not constant drivers/staging/phison/phison.c:43: error: (near initialization for 'phison_sht.module') drivers/staging/phison/phison.c:47: error: 'ata_bmdma_port_ops' undeclared here (not in a function) Signed-off-by: Randy Dunlap <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: iio-utils: fix memory overflow for dynamically allocateded memory ↵Barry Song1-2/+1
to hold filename Signed-off-by: Barry Song <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: adis16255: add proper section markings to hotplug funcsMike Frysinger1-2/+2
Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: adis16255: fix typo in KconfigMike Frysinger1-1/+1
Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: batman-adv: Don't allocate icmp packet with GFP_KERNELSven Eckelmann1-1/+1
A new buffer for a packet is created when a icmp packet is received. This happens in a context with disabled irq. Thus we are not allowed to sleep or call function which might sleep. kmalloc must be called with GFP_ATOMIC instead of GFP_KERNEL to ensure that it does not sleep. Signed-off-by: Sven Eckelmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: batman-adv: Don't call free_netdev twiceSven Eckelmann1-0/+3
Free_netdev is registered as destructor in interface_setup for every soft_device. This destructor is automatically called from unregister_netdev and we must not call it again for the freed net_device. Signed-off-by: Sven Eckelmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: batman-adv: Call unregister_netdev on failures to get rtnl lockSven Eckelmann1-1/+1
We must call unregister_netdev when we couldn't initialise the batman-adv module and the soft_device was registered. There are two version of the function which we can use: * unregister_netdevice - removes device * unregister_netdev - takes rtnl semaphore and remove device We don't hold the semaphore in an error situation. So we must use unregister_netdev. Signed-off-by: Sven Eckelmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: batman-adv: fix rogue packets on shutdownMarek Lindner1-9/+15
On module shutdown batman-adv would purge the internal packet queue by sending all remaining packets which could confuse other nodes. Now, the packets are silently discarded. Signed-off-by: Marek Lindner <[email protected]> Signed-off-by: Sven Eckelmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: add MSM framebuffer driverStepan Moskovchenko70-0/+30037
Qualcomm development of the MSM SOC framebuffer driver has diverged significantly from the driver used by Android. This is a snapshot of our current driver, in all it's agony. We are putting this in staging to help with the process of converging the two drivers. At this point, the driver has been tested only in dumb framebuffer mode. Signed-off-by: Stepan Moskovchenko <[email protected]> Signed-off-by: David Brown <[email protected]> Signed-off-by: Abhijeet Dharmapurikar <[email protected]> [[email protected]: added a small compile fix and TODO.] Signed-off-by: Daniel Walker <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: comedi: fixing ni_tio to mite PCI dependancyAlexander Kurz1-1/+1
On Wed, 19 May 2010, Randy Dunlap wrote: > linux-next of 2010-0519: > when CONFIG_PCI is not enabled: > > drivers/staging/comedi/drivers/mite.c: In function 'mite_init': > drivers/staging/comedi/drivers/mite.c:89: error: implicit declaration of function 'pci_dev_get' > drivers/staging/comedi/drivers/mite.c:89: warning: assignment makes pointer from integer without a cast > make[5]: *** [drivers/staging/comedi/drivers/mite.o] Error 1 This patch fixes the problem. Signed-off-by: Alexander Kurz <[email protected]> Acked-by: Randy Dunlap <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: comedi: fix 8255 and DAS08 Kconfig dependancies.Alexander Kurz2-23/+59
Both drivers support directly or indirectly multiple bus types, hence both are listed independent of bus types. Signed-off-by: Alexander Kurz <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: comedi: For COMEDI_BUFINFO, check access to commandIan Abbott1-3/+16
Don't allow COMEDI_BUFINFO ioctl if some other file object has locked the subdevice or has an active command. If there is no active command, just report back the last buffer position. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: comedi: COMEDI_BUFINFO with no async - report no bytes read or writtenIan Abbott1-0/+2
When the COMEDI_BUFINFO ioctl is used on a subdevice without asynchronous streaming command support, set 'bytes_read = 0' and 'bytes_written = 0' in the buffer info returned back to the user. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: comedi: don't write to buffer if command finishedIan Abbott1-10/+13
For write(), any data copied to the data buffer after the previously set up streaming acquisition command has finished won't be used, but a non-empty write() does not currently return 0 (or -EPIPE on error) after the command has finished until the data buffer has been filled up. Change this behavior to return 0 (or -EPIPE) any time after the command has finished, without bothering to fill up the buffer with more useless data. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: comedi: amplc_dio200: Protect counter subdevice with spinlockIan Abbott1-10/+25
The internal state of an 82C54 counter timer chip will get messed up if several threads read, write, configure, or check the status of the chip simultaneously. Protect the register access sequences with a spin lock. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: comedi: adv_pci_dio: Support Advantech PCI-1735UIan Abbott1-11/+169
Add support for the Advantech PCI-1735U card, including support for a counter subdevice (based on an 82C54 counter timer chip). The counter subdevice needs more testing, as the only person I know who tried it couldn't get it to work! Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: comedi: addi-data: don't overwrite name for request_irq()Ian Abbott1-5/+1
The Addi-Data PCI drivers for Comedi use sprintf() in their comedi "attach" routine to construct a string to pass as the name in the call to request_irq(). All calls to "attach" routine share the same static buffer for this name, but the contents will differ on each call (including the comedi device number and the comedi board name). This changes the name displayed in /proc/interrupts for previous calls to request_irq() using the same buffer. Just use the board name instead; it has slightly less information (no comedi device number) but at least it doesn't change over the lifetime of the IRQ handler. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: comedi: Give the addi_apci_* drivers different driver namesIan Abbott17-2/+38
It is not currently possible for more than one of the addi_apci_* drivers to register themselves with comedi at once because they all use the same comedi driver name "addi_common". Give them different names. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: mid: Intel MID touch screen driverSreedhara DS6-0/+879
Touchscreen driver used by intel mid devices. Some clean up by Alan Cox. This driver is basically ready for upstreaming properly but is tied wrongly to the SPI layer and needs firmware/SFI changes to fix that. Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04staging: Add framebuffer driver for XGI chipsets[email protected]24-0/+28503
This driver handles XG20, XG21, XG40, XG42 chipsets from XGI. They're also known as Z7,Z9,Z11 chipsets. It's based on the SiS fb driver but has been heavily modified by XGI to support their newer chipsets. Signed-off-by: Arnaud Patard <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04serial: add support for various Titan PCI cardsYegor Yefremov1-0/+71
serial: add support for various Titan PCI cards Models: 200I, 400I, 800I, 400EH, 800EH, 800EHB, 100E, 200E, 400E, 800E, 200EI, 200EISI Signed-off-by: Yegor Yefremov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04vt_ioctl: return -EFAULT on copy_from_user errorsDan Carpenter1-1/+3
copy_from_user() returns the number of bytes remaining but we want to return a negative error code here. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04serial: altera_uart: Proper section for altera_uart_removeTobias Klauser1-1/+1
altera_uart_remove should be in .devexit.text Signed-off-by: Tobias Klauser <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04tty: fix a little bug in scrup, vt.cFrank Pan1-1/+1
The code uses vc->vc_cols instead of vc->vc_size_row by mistake, it will cause half of the region which is going to clear remain uncleared. The issue happens in background consoles, so it's hard to observe. Frank Pan Signed-off-by: Frank Pan <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04altera_uart: Simplify altera_uart_console_putcTobias Klauser1-15/+8
The check for the TRDY flag after writing the character is not needed. Also do a cpu_relax() inside the loop. Pass a struct uart_port to altera_uart_console_putc, so we do not need to get it (and dereference pointers) for every character. Cc: Thomas Chou <[email protected]> Signed-off-by: Tobias Klauser <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04altera_uart: Don't take spinlock in already protected functionsTobias Klauser1-15/+4
Don't take the port spinlock in uart functions where the serial core already takes care of locking/unlocking them. The code would actually lock up on architectures where spinlocks are implemented (not the case on nios2 where this driver is primarily used for now, thus this bug didn't trigger). Also protect calling altera_uart_rx_chars/altera_uart_tx_chars in the interrupt handler by the port spinlock. Thanks to Ian Abbott for pointing these issues out. Cc: Ian Abbott <[email protected]> Cc: Thomas Chou <[email protected]> Signed-off-by: Tobias Klauser <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04TTY/n_gsm: potential double lockDan Carpenter1-4/+5
In gsm_dlci_data_kick() we call gsm_dlci_data_sweep() with the "gsm->tx_lock" held so we can't lock it again inside gsm_dlci_data_sweep(). I removed that lock from and added one to gsmld_write_wakeup() instead. The sweep function is only called from those two places. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Alan Cox <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04serial: bfin_5xx: fix typo in IER checkSonic Zhang1-1/+1
This most likely won't cause problems on systems as people don't typically enable GPIO RTS/CTS if they don't actually use it. Signed-off-by: Sonic Zhang <[email protected]> Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04serial: bfin_5xx: IRDA is not affected by anomaly 05000230Graf Yang1-1/+6
Anomaly 05000230 (over sampling of the UART STOP bit) applies only when the peripheral is operating in UART mode. So drop the anomaly handling when the UART is in IRDA mode. Signed-off-by: Graf Yang <[email protected]> Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04serial_cs: add and sort IDs for serial and modem cardsAlexander Kurz1-2/+16
Signed-off-by: Alexander Kurz <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04msm_serial: fix serial on troutAbhijeet Dharmapurikar2-18/+59
Set the mnd counter based on uartclk. This fixes a problem on 7x30 where the uartclk is 19.2Mhz rather than the usual 4.8Mhz. Trout incorrectly reports uartclk to be running at 19.2Mhz It is actually running at 4.8Mhz. For trout force mnd counter values as if uartclk was fed by tcxo/4. Signed-off-by: Abhijeet Dharmapurikar <[email protected]> [[email protected]: inlined, moved into header, added comments.] Signed-off-by: Daniel Walker <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04fix setattr error handling in sysfs, configfsNick Piggin2-7/+8
sysfs and configfs setattr functions have error cases after the generic inode's attributes have been changed. Fix consistency by changing the generic inode attributes only when it is guaranteed to succeed. Signed-off-by: Nick Piggin <[email protected]> Acked-by: Joel Becker <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04kobject: free memory if netlink_kernel_create() failsDan Carpenter1-0/+1
There is a kfree(ue_sk) missing on the error path if netlink_kernel_create() fails. Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: "Eric W. Biederman" <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04lib/kobject_uevent.c: fix CONIG_NET=n warningAndrew Morton1-0/+2
lib/kobject_uevent.c:87: warning: 'kobj_bcast_filter' defined but not used Repairs "hotplug: netns aware uevent_helper" Cc: Eric W. Biederman <[email protected]> Cc: David S. Miller <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04USB: unbind all interfaces before rebinding themAlan Stern1-0/+2
This patch (as1387) fixes a bug introduced during the changeover to the runtime PM framework. When a driver doesn't support resume or reset-resume, and consequently its interfaces need to be unbound and rebound, we have to unbind all the interfaces before trying to rebind any of them. Otherwise the driver's probe method for one interface could try to claim a different interface and fail, because that other interface hasn't been unbound yet. This fixes Bugzilla #15788. The symptom is that some USB sound cards don't work after hibernation. Signed-off-by: Alan Stern <[email protected]> Tested-by: François Valenduc <[email protected]> Cc: stable <[email protected]> [.34] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04USB: serial: digi_acceleport: Eliminate a NULL pointer dereferenceJulia Lawall1-2/+1
If port is NULL, then the call to dev_err will dereference a value that is a small offset from NULL. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ expression E,E1; identifier f; statement S1,S2,S3; @@ if ((E == NULL && ...) || ...) { ... when != if (...) S1 else S2 when != E = E1 * E->f ... when any return ...; } else S3 // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>