aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* x86: don't use 'access_ok()' as a range check in get_user_pages_fast()Linus Torvalds2009-06-20
| | | | | | | | | | | | | | | | | | | | | | | It's really not right to use 'access_ok()', since that is meant for the normal "get_user()" and "copy_from/to_user()" accesses, which are done through the TLB, rather than through the page tables. Why? access_ok() does both too few, and too many checks. Too many, because it is meant for regular kernel accesses that will not honor the 'user' bit in the page tables, and because it honors the USER_DS vs KERNEL_DS distinction that we shouldn't care about in GUP. And too few, because it doesn't do the 'canonical' check on the address on x86-64, since the TLB will do that for us. So instead of using a function that isn't meant for this, and does something else and much more complicated, just do the real rules: we don't want the range to overflow, and on x86-64, we want it to be a canonical low address (on 32-bit, all addresses are canonical). Acked-by: Ingo Molnar <mingo@elte.hu> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6Linus Torvalds2009-06-19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (342 commits) Staging: comedi: fix build errors Staging: udlfb: update to version 0.2.3 Staging: udlfb: fix some sparse warnings. Staging: udlfb: clean up checkpatch warnings in udlfb.c Staging: udlfb: clean up checkpatch warnings in udlfb.h Staging: udlfb: add udlfb driver to build Staging: add udlfb driver Staging: pata_rdc: remove pointless comments Staging: pata_rdc: remove DRIVER macros Staging: pata_rdc: remove dbgprintf macro Staging: pata_rdc: remove broken flag Staging: pata_rdc: fix build warnings Staging: pata_rdc: use PCI_DEVICE Staging: pata_rdc: remove function prototypes Staging: pata_rdc: coding style fixes Staging: pata_rdc: convert code to work in 2.6.29 Staging: pata_rdc: add driver to the build system Staging: add pata_rdc driver Staging: remove obsolete serqt_usb driver Staging: serqt_usb2 add the driver to the build ...
| * Staging: comedi: fix build errorsGreg Kroah-Hartman2009-06-19
| | | | | | | | | | | | | | Some of the comedi drivers need timer.h to build properly, so put it in the comedidev.h file to fix these errors. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: udlfb: update to version 0.2.3Roberto De Ioris2009-06-19
| | | | | | | | | | | | | | | | This updates the udlfb to the 0.2.3 version. From: Roberto De Ioris <roberto@unbit.it> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: udlfb: fix some sparse warnings.Greg Kroah-Hartman2009-06-19
| | | | | | | | | | | | | | | | | | There are others remaining due to the __iomem namespace of the framebuffer data pointer. Cc: Roberto De Ioris <roberto@unbit.it> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: udlfb: clean up checkpatch warnings in udlfb.cGreg Kroah-Hartman2009-06-19
| | | | | | | | | | | | | | | | This cleans up a bunch of checkpatch.pl warnings in the udlfb.c file. Cc: Roberto De Ioris <roberto@unbit.it> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: udlfb: clean up checkpatch warnings in udlfb.hGreg Kroah-Hartman2009-06-19
| | | | | | | | | | | | | | This cleans up a bunch of checkpatch.pl warnings in the udlfb.h file. Cc: Roberto De Ioris <roberto@unbit.it> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: udlfb: add udlfb driver to buildGreg Kroah-Hartman2009-06-19
| | | | | | | | | | | | | | This adds the udlfb driver to the build system Cc: Roberto De Ioris <roberto@unbit.it> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: add udlfb driverRoberto De Ioris2009-06-19
| | | | | | | | | | | | | | | | This adds the udlfb driver, a framebuffer driver for DisplayLink devices. From: Roberto De Ioris <roberto@unbit.it> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: pata_rdc: remove pointless commentsGreg Kroah-Hartman2009-06-19
| | | | | | | | | | | | | | | | | | | | These comments contribute nothing to the code, and most were just cut and pasted from another driver. Cc: Kevin Huang <Kevin.Huang@rdc.com.tw> Cc: Tomy Wang <Tomy.Wang@rdc.com.tw> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: pata_rdc: remove DRIVER macrosGreg Kroah-Hartman2009-06-19
| | | | | | | | | | | | | | | | | | They are not needed, and the version one was pointless now that the code is merged into the tree. Cc: Kevin Huang <Kevin.Huang@rdc.com.tw> Cc: Tomy Wang <Tomy.Wang@rdc.com.tw> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: pata_rdc: remove dbgprintf macroGreg Kroah-Hartman2009-06-19
| | | | | | | | | | | | | | | | Use dev_dbg() instead. Cc: Kevin Huang <Kevin.Huang@rdc.com.tw> Cc: Tomy Wang <Tomy.Wang@rdc.com.tw> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: pata_rdc: remove broken flagGreg Kroah-Hartman2009-06-19
| | | | | | | | | | | | | | | | | | The "in_module_init" flag was wrong, so just remove it, it's not needed. Cc: Kevin Huang <Kevin.Huang@rdc.com.tw> Cc: Tomy Wang <Tomy.Wang@rdc.com.tw> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: pata_rdc: fix build warningsGreg Kroah-Hartman2009-06-19
| | | | | | | | | | | | | | | | | | | | struct ata_port_info shouldn't be const, so remove that which fixes up the compiler warnings. Cc: Kevin Huang <Kevin.Huang@rdc.com.tw> Cc: Tomy Wang <Tomy.Wang@rdc.com.tw> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: pata_rdc: use PCI_DEVICEGreg Kroah-Hartman2009-06-19
| | | | | | | | | | | | | | | | | | Use the PCI_DEVICE macro, that's what it is there for... Cc: Kevin Huang <Kevin.Huang@rdc.com.tw> Cc: Tomy Wang <Tomy.Wang@rdc.com.tw> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: pata_rdc: remove function prototypesGreg Kroah-Hartman2009-06-19
| | | | | | | | | | | | | | | | | | Move code around so we do not need the function prototypes anymore. Cc: Kevin Huang <Kevin.Huang@rdc.com.tw> Cc: Tomy Wang <Tomy.Wang@rdc.com.tw> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: pata_rdc: coding style fixesGreg Kroah-Hartman2009-06-19
| | | | | | | | | | | | | | | | | | This fixes a number of coding style issues in the pata_rdc.h file Cc: Kevin Huang <Kevin.Huang@rdc.com.tw> Cc: Tomy Wang <Tomy.Wang@rdc.com.tw> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: pata_rdc: convert code to work in 2.6.29Greg Kroah-Hartman2009-06-19
| | | | | | | | | | | | | | | | | | | | | | This fixes build problems in the pata_rdc driver due to api changes in the libata layer. Cc: Kevin Huang <Kevin.Huang@rdc.com.tw> Cc: Tomy Wang <Tomy.Wang@rdc.com.tw> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: pata_rdc: add driver to the build systemGreg Kroah-Hartman2009-06-19
| | | | | | | | | | | | | | Cc: Kevin Huang <Kevin.Huang@rdc.com.tw> Cc: Tomy Wang <Tomy.Wang@rdc.com.tw> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: add pata_rdc driverKevin Huang2009-06-19
| | | | | | | | | | | | | | | | | | | | This is our IDE Source code. This is base on kernel 2.6.28. pata_rdc.h and pata_rdc.c From: Kevin Huang <Kevin.Huang@rdc.com.tw> Cc: Tomy Wang <Tomy.Wang@rdc.com.tw> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: remove obsolete serqt_usb driverGreg Kroah-Hartman2009-06-19
| | | | | | | | | | | | | | Now that Bill rewrote the driver "properly", this old thing can be removed. Cc: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: serqt_usb2 add the driver to the buildBill Pemberton2009-06-19
| | | | | | | | | | | | Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: Add serqt_usb2, a rewrite of serqt_usb for the usb-serial layerBill Pemberton2009-06-19
| | | | | | | | | | | | | | | | This is the serqt_usb driver rewritten to use usb-serial. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: asus_oled: fix build warningsGreg Kroah-Hartman2009-06-19
| | | | | | | | | | | | This fixes some build warnings in the asus_oled driver. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: slicoss: fix build warningsGreg Kroah-Hartman2009-06-19
| | | | | | | | | | | | This fixes some build warnings in the slicoss driver. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: slicoss: Add missing __devexit_p()Jean Delvare2009-06-19
| | | | | | | | | | | | | | | | | | The remove function uses __devexit, so the .remove assignment needs __devexit_p() to fix a build error with hotplug disabled. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: altpciechdma: fix build warningsGreg Kroah-Hartman2009-06-19
| | | | | | | | | | | | This fixes some build warnings in the altpciechdma driver. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: altpciechdma: Add missing __devexit_p()Jean Delvare2009-06-19
| | | | | | | | | | | | | | | | | | The remove function uses __devexit, so the .remove assignment needs __devexit_p() to fix a build error with hotplug disabled. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: heci: fix the problem that file_ext->state should be protected by ↵Dongxiao Xu2009-06-19
| | | | | | | | | | | | | | | | | | | | | | device_lock While access file_ext->state, we should use device_lock to protect it. The original codes miss this in some places. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: heci: do not print error when heci_bh_handler is already on workqueueDongxiao Xu2009-06-19
| | | | | | | | | | | | | | | | | | | | schedule_work returns 0, if the work is already on the work_queue, else returns non-zero. Do not print error message if heci_bh_handlerwork was already on queue. Signed-off-by: Nikanth Karthikesan <knikanth@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: heci: fix setting h_is bit in h_csr registerDongxiao Xu2009-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Host software could issue interrupts to ME firmware, using H_IG bit. While Setting H_IG bit, host software should preserve all the other bits in H_CSR unchanged. In the original function which sets H_CSR register, they first read the register, then set some bits, and write the whole 32bits back to the register. And that the special behavior of H_IS (write-one-to-zero) causes problem. This patch fixes the issue in the following ways: - Modify heci_set_csr_register() function so that it doesn't change H_IS bit. - Add interface heci_csr_clear_his() to clear H_IS bit. This function is called after H_IS checking (dev->host_hw_state & H_IS == H_IS). - In original heci_csr_disable_interrupts() function, it not only clears H_IE bit, sometimes it also clears H_IS bit. This patch separates the two parts. - Avoid calling write_heci_register() function to set H_CSR register directly, and instead using heci_set_csr_register() function Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: heci: fix typos and add wait after disconnectDongxiao Xu2009-06-19
| | | | | | | | | | | | | | | | | | | | | | - Fix typo for enum HECI_WRITE. - Fix timeout issue. If the time period is greater or equal 15s, it's timeout. - Add 10ms wait time after disconnect, to ensure that hardware is ready. Otherwise in the next time connection, hardware resource may be busy. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: heci: fix softirq safe to unsafe spinlock issueDongxiao Xu2009-06-19
| | | | | | | | | | | | | | | | | | | | When spinlock is nested, and the outside one is spin_lock_bh, the inner spinlock should also be spin_lock_bh, otherwise it will bring softirq-safe to softirq-unsafe lock conversion. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: heci: fix spinlock order mess of device_lock and read_io_lockDongxiao Xu2009-06-19
| | | | | | | | | | | | | | | | | | | | In orginal code, the device_lock and read_io_lock is mess order when nested, which may bring dead lock. This patch unify the spinlock order of device_lock and read_io_lock. First acquire device_lock, then read_io_lock. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: heci: fix wrong order of device_lock and file_lockDongxiao Xu2009-06-19
| | | | | | | | | | | | | | | | | | When the two locks are nested, the code should always first acquire file_lock, and then acquire device_lock in order not to generate dead-lock race. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: heci: fix userspace pointer messDongxiao Xu2009-06-19
| | | | | | | | | | | | | | | | | | | | Fix userspace pointer mess. - In memcmp(), dest and src pointer should be both in kernel space. - Add (void __user *) modification before userspace pointer. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: rspiusb: copy_to/from_user related fixesvibi sreenivasan2009-06-19
| | | | | | | | | | | | | | | | | | | | | | | | The patch does copy_to/from_user related fixes *) __copy_from/to_user is enough for user space data buffer checked by access_ok. *) return -EFAULT if __copy_from/to_user fails. *) Do not use memcpy to copy from user space. Signed-off-by: Vibi Sreenivasan <vibi_sreenivasan@cms.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: rspiusb: Fix a bunch of warnings.vibi sreenivasan2009-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch fixes the following warnings. drivers/staging/rspiusb/rspiusb.c: In function ‘pixel_data’: drivers/staging/rspiusb/rspiusb.c:267: warning: passing argument 1 of ‘SetPageDirty’ makes pointer from integer without a cast drivers/staging/rspiusb/rspiusb.c: In function ‘UnMapUserBuffer’: drivers/staging/rspiusb/rspiusb.c:500: warning: passing argument 1 of ‘put_page’ makes pointer from integer without a cast drivers/staging/rspiusb/rspiusb.c: In function ‘MapUserBuffer’: drivers/staging/rspiusb/rspiusb.c:662: warning: assignment makes integer from pointer without a cast drivers/staging/rspiusb/rspiusb.c:670: warning: assignment makes integer from pointer without a cast Signed-off-by: Vibi Sreenivasan <vibi_sreenivasan@cms.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: rspiusb: duplicate code in pixis_ioRichard Genoud2009-06-19
| | | | | | | | | | | | | | | | | | It seems that pixis_io and pixis_io2 should do the same thing. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: rspiusb.c: break the huge piusb_ioctl function into several onesRichard Genoud2009-06-19
| | | | | | | | | | | | | | | | This makes the code more readable, makes checkpatch really happy and factorize some code. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: rspiusb: clean rspiusb codeRichard Genoud2009-06-19
| | | | | | | | | | | | | | | | This first patch makes checkpatch happier Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: rspiusb: make driver compileJ.R. Mauro2009-06-19
| | | | | | | | | | | | | | | | Convert undefined info() function calls to dev_err, making rspiusb compile Signed-off-by: J.R. Mauro <jrm8005@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging: p9auth: prevent some oopses and memory leaksSerge E. Hallyn2009-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before all testcases, do: mknod /dev/caphash c 253 0 mknod /dev/capuse c 253 1 This patch does the following: 1. caphash write of > CAP_NODE_SIZE bytes overruns node_ptr->data (test: cat /etc/mime.types > /dev/caphash) 2. make sure we don't dereference a NULL cap_devices[0].head (test: cat serge@root@abab > /dev/capuse) 3. don't let strlen dereference a NULL target_user etc (test: echo ab > /dev/capuse) 4. Don't leak a bunch of memory in cap_write(). Note that technically node_ptr is not needed for the capuse write case. As a result I have a much more extensive patch splitting up cap_write(), but I thought a smaller patch that is easier to test and verify would be a better start. To test: cnt=0 while [ 1 ]; do echo /etc/mime.types > /dev/capuse if [ $((cnt%25)) -eq 0 ]; then head -2 /proc/meminfo fi cnt=$((cnt+1)) sleep 0.3 done Without this patch, it MemFree steadily drops. With the patch, it does not. I have *not* tested this driver (with or without these patches) with factotum or anything - only using the tests described above. Signed-off-by: Serge E. Hallyn <serue@us.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: oslec bug fixDavid Rowe2009-06-19
| | | | | | | | | | | | | | | | | | | | | | I have just had a bug fix submitted for Oslec which I have applied to Oslec SVN. The bug can potentially stops the echo canceller adapting after a few seconds, although it hasn't caused many problems in practice. Signed-off-by: David Rowe <david@rowetel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging: b3dfg: clean up MODULE_PARM_DESC newlineAndre Lopes2009-06-19
| | | | | | | | | | | | | | | | Remove incorrect MODULE_PARM_DESC newline. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging: wis-sony-tuner.c: fix &&/|| errorRoel Kluin2009-06-19
| | | | | | | | | | | | | | | | | | Fix &&/|| typo Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: rtl8192su: Correct use of ! and &Julia Lawall2009-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct priority problem in the use of ! and &. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ expression E; constant C; @@ - !E & C + !(E & C) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: rtl8192su: fix build warningsGreg Kroah-Hartman2009-06-19
| | | | | | | | | | | | This fixes some build warnings in the rtl8192su driver. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: add rtl8192SU wireless usb driverJerry Chuang2009-06-19
| | | | | | | | | | | | | | | | | | | | | | Driver from Realtek for the Realtek RTL8192 USB wifi device Based on the r8187 driver from Andrea Merello <andreamrl@tiscali.it> and others. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: cpc-usb: fix build warningsGreg Kroah-Hartman2009-06-19
| | | | | | | | | | | | This fixes some build warnings in the cpc-usb driver. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>