aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-06-04fs/binfmt_flat.c: split the stack & data alignmentsMike Frysinger1-8/+15
The stack and data have different alignment requirements, so don't force them to wear the same shoe. Increase the data alignment to match that which the elf2flt linker script has always been using: 0x20 bytes. Not only does this bring the kernel loader in line with the toolchain, but it also fixes a swath of gcc tests which try to force larger alignment values but randomly fail when the FLAT loader fails to deliver. Signed-off-by: Mike Frysinger <[email protected]> Cc: Herbert Xu <[email protected]> Cc: David Woodhouse <[email protected]> Cc: Pekka Enberg <[email protected]> Acked-by: David McCullough <[email protected]> Acked-by: Greg Ungerer <[email protected]> Cc: Paul Mundt <[email protected]> Tested-by: Michal Simek <[email protected]> Cc: Hirokazu Takata <[email protected]> Cc: Yoshinori Sato <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Jie Zhang <[email protected]> Cc: David Howells <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-06-04vmware balloon: clamp number of collected non-balloonable pagesDmitry Torokhov1-3/+15
Limit number of accumulated non-balloonable pages during inflation cycle, otherwise there is a chance we will be spinning and growing the list forever. This happens during torture tests when balloon target changes while we are in the middle of inflation cycle and monitor starts refusing to lock pages (since they are not needed anymore). Signed-off-by: Dmitry Torokhov <[email protected]> Acked-by: Bhavesh Davda <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-06-04xtensa: invoke oom-killer from page faultNick Piggin1-10/+4
As explained in commit 1c0fe6e3bd ("mm: invoke oom-killer from page fault") , we want to call the architecture independent oom killer when getting an unexplained OOM from handle_mm_fault, rather than simply killing current. Signed-off-by: Nick Piggin <[email protected]> Acked-by: David Rientjes <[email protected]> Cc: Chris Zankel <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-06-04mn10300: invoke oom-killer from page faultNick Piggin1-5/+4
As explained in commit 1c0fe6e3bd ("mm: invoke oom-killer from page fault") , we want to call the architecture independent oom killer when getting an unexplained OOM from handle_mm_fault, rather than simply killing current. Signed-off-by: Nick Piggin <[email protected]> Acked-by: David Rientjes <[email protected]> Acked-by: David Howells <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-06-04m32r: invoke oom-killer from page faultNick Piggin1-10/+4
As explained in commit 1c0fe6e3bd ("mm: invoke oom-killer from page fault") , we want to call the architecture independent oom killer when getting an unexplained OOM from handle_mm_fault, rather than simply killing current. Signed-off-by: Nick Piggin <[email protected]> Acked-by: David Rientjes <[email protected]> Cc: Hirokazu Takata <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-06-04frv: invoke oom-killer from page faultNick Piggin1-4/+4
As explained in commit 1c0fe6e3bd ("mm: invoke oom-killer from page fault") , we want to call the architecture independent oom killer when getting an unexplained OOM from handle_mm_fault, rather than simply killing current. Signed-off-by: Nick Piggin <[email protected]> Acked-by: David Howells <[email protected]> Acked-by: David Rientjes <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-06-04ramoops: add HAS_IOMEM dependencyHeiko Carstens1-0/+1
The driver fails to compile on s390: drivers/char/ramoops.c: In function 'ramoops_init': drivers/char/ramoops.c:122: error: implicit declaration of function 'ioremap' Since we won't make use of the driver anyway on s390 just let it depend on HAS_IOMEM. Signed-off-by: Heiko Carstens <[email protected]> Cc: Marco Stornelli <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-06-04fs/compat_rw_copy_check_uvector: add missing compat_ptr callHeiko Carstens1-1/+1
A call to access_ok is missing a compat_ptr conversion. Introduced with b83733639a494d5f42fa00a2506563fbd2d3015d "compat: factor out compat_rw_copy_check_uvector from compat_do_readv_writev" fs/compat.c: In function 'compat_rw_copy_check_uvector': fs/compat.c:629: warning: passing argument 1 of '__access_ok' makes pointer from integer without a cast Signed-off-by: Heiko Carstens <[email protected]> Reviewed-by: Jeff Moyer <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-06-04rtc: s3c: initialize s3c_rtc_cpu_type before using itMaurus Cuelenaere1-2/+2
Make sure s3c_rtc_cpu_type is initialised _before_ it's used in an if() check. Reported-by: Jiri Pinkava <[email protected]> Signed-off-by: Maurus Cuelenaere <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Maurus Cuelenaere <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-06-04rtc: s3c: initialize driver data before using itMaurus Cuelenaere1-2/+3
s3c_rtc_setfreq() uses the platform driver data to derive struct rtc_device, so make sure drvdata is set _before_ s3c_rtc_setfreq() is called. Signed-off-by: Maurus Cuelenaere <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Maurus Cuelenaere <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
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]>