commit f584d374f2ab8cbc348ad23ecb82b419c0b8705c Author: Greg Kroah-Hartman Date: Mon Jan 25 10:50:10 2010 -0800 Linux 2.6.32.6 commit 9607f0688fe1db11f19ff43940fe4697845ec9da Author: Peter Zijlstra Date: Mon Jan 18 09:12:32 2010 +0100 perf: Honour event state for aux stream data commit 22e190851f8709c48baf00ed9ce6144cdc54d025 upstream. Anton reported that perf record kept receiving events even after calling ioctl(PERF_EVENT_IOC_DISABLE). It turns out that FORK,COMM and MMAP events didn't respect the disabled state and kept flowing in. Reported-by: Anton Blanchard Signed-off-by: Peter Zijlstra Tested-by: Anton Blanchard LKML-Reference: <1263459187.4244.265.camel@laptop> Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman commit b0a93920c4117933657cb5572157ce502ef0fc57 Author: Peter Zijlstra Date: Thu Dec 17 13:16:32 2009 +0100 perf events: Dont report side-band events on each cpu for per-task-per-cpu events commit 5d27c23df09b702868d9a3bff86ec6abd22963ac upstream. Acme noticed that his FORK/MMAP numbers were inflated by about the same factor as his cpu-count. This led to the discovery of a few more sites that need to respect the event->cpu filter. Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: <20091217121830.215333434@chello.nl> Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman commit 5a20267b12fec85520acc1e839ee61f2ea16413d Author: Arjan van de Ven Date: Sat Jan 16 12:53:19 2010 -0800 perf timechart: Use tid not pid for COMM change commit 8f06d7e6e1bbfb32698d6d455583ab7460c090e2 upstream. A process that changes its comm field, does this on a per kernel task struct basis. The timechart tool used, incorrectly, the pid to track this, and should have used the tid instead... Signed-off-by: Arjan van de Ven Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker LKML-Reference: <20100116125319.34ac3edd@infradead.org> Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman commit f2fa92b29da64ead309293a048fe41776338a280 Author: Yongseok Koh Date: Tue Jan 19 17:33:49 2010 +0900 vmalloc: remove BUG_ON due to racy counting of VM_LAZY_FREE commit 88f5004430babb836cfce886d5d54c82166f8ba4 upstream. In free_unmap_area_noflush(), va->flags is marked as VM_LAZY_FREE first, and then vmap_lazy_nr is increased atomically. But, in __purge_vmap_area_lazy(), while traversing of vmap_are_list, nr is counted by checking VM_LAZY_FREE is set to va->flags. After counting the variable nr, kernel reads vmap_lazy_nr atomically and checks a BUG_ON condition whether nr is greater than vmap_lazy_nr to prevent vmap_lazy_nr from being negative. The problem is that, if interrupted right after marking VM_LAZY_FREE, increment of vmap_lazy_nr can be delayed. Consequently, BUG_ON condition can be met because nr is counted more than vmap_lazy_nr. It is highly probable when vmalloc/vfree are called frequently. This scenario have been verified by adding delay between marking VM_LAZY_FREE and increasing vmap_lazy_nr in free_unmap_area_noflush(). Even the vmap_lazy_nr is for checking high watermark, it never be the strict watermark. Although the BUG_ON condition is to prevent vmap_lazy_nr from being negative, vmap_lazy_nr is signed variable. So, it could go down to negative value temporarily. Consequently, removing the BUG_ON condition is proper. A possible BUG_ON message is like the below. kernel BUG at mm/vmalloc.c:517! invalid opcode: 0000 [#1] SMP EIP: 0060:[] EFLAGS: 00010297 CPU: 3 EIP is at __purge_vmap_area_lazy+0x144/0x150 EAX: ee8a8818 EBX: c08e77d4 ECX: e7c7ae40 EDX: c08e77ec ESI: 000081fe EDI: e7c7ae60 EBP: e7c7ae64 ESP: e7c7ae3c DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 Call Trace: [] free_unmap_vmap_area_noflush+0x69/0x70 [] remove_vm_area+0x22/0x70 [] __vunmap+0x45/0xe0 [] vmalloc+0x2c/0x30 Code: 8d 59 e0 eb 04 66 90 89 cb 89 d0 e8 87 fe ff ff 8b 43 20 89 da 8d 48 e0 8d 43 20 3b 04 24 75 e7 fe 05 a8 a5 a3 c0 e9 78 ff ff ff <0f> 0b eb fe 90 8d b4 26 00 00 00 00 56 89 c6 b8 ac a5 a3 c0 31 EIP: [] __purge_vmap_area_lazy+0x144/0x150 SS:ESP 0068:e7c7ae3c [ See also http://marc.info/?l=linux-kernel&m=126335856228090&w=2 ] Signed-off-by: Yongseok Koh Reviewed-by: Minchan Kim Cc: Nick Piggin Cc: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit 3d0cc9a9a1cd4a043ffcd3251161d07a846a103c Author: Ryan May Date: Wed Jan 6 10:09:25 2010 -0600 USB: fix usbstorage for 2770:915d delivers no FAT commit 10d2cdb6102669279bee2d9a00a22431b74583d5 upstream. Resolves kernel.org bug 14914. Remove entry for 2770:915d (usb digital camera with mass storage support) from unusual_devs.h. The fix triggered by the entry causes the file system on the camera to be completely inaccessible (no partition table, the device is not mountable). The patch works, but let me clarify a few things about it. All the patch does is remove the entry for this device from the drivers/usb/storage/unusual_devs.h, which is supposed to help with a problem with the device's reported size (I think). I'm pretty sure it was originally added for a reason, so I'm not sure removing it won't cause other problems to reappear. Also, I should note that this unusual_devs.h entry was present (and activating workarounds) in 2.6.29, but in that version everything works fine. Starting with 2.6.30, things no longer work. Signed-off-by: Ryan May Cc: Rohan Hart Signed-off-by: Greg Kroah-Hartman commit 538a6fdbcffffe7ddecf13f94129502524f771d5 Author: Suresh Siddha Date: Mon Oct 26 13:21:32 2009 -0800 x86/PCI/PAT: return EINVAL for pci mmap WC request for !pat_enabled commit 2992e545ea006992ec9dc91c4fa996ce1e15f921 upstream. Thomas Schlichter reported: > X.org uses libpciaccess which tries to mmap with write combining enabled via > /sys/bus/pci/devices/*/resource0_wc. Currently, when PAT is not enabled, the > kernel does fall back to uncached mmap. Then libpciaccess thinks it succeeded > mapping with write combining enabled and does not set up suited MTRR entries. > ;-( Instead of silently mapping pci mmap region as UC minus in the case of !pat_enabled and wc request, we can return error. Eric Anholt mentioned that caller (like X) typically follows up with UC minus pci mmap request and if there is a free mtrr slot, caller will manage adding WC mtrr. Jesse Barnes says: > Older versions of libpciaccess will behave better if we do it that way > (iirc it only allocates an MTRR if the resource_wc file doesn't exist or > fails to get mapped). Reported-by: Thomas Schlichter Signed-off-by: Thomas Schlichter Signed-off-by: Suresh Siddha Acked-by: Eric Anholt Acked-by: Jesse Barnes Signed-off-by: Jesse Barnes Signed-off-by: Greg Kroah-Hartman commit e0f5cfa7c18b411634e73923841eccd3a4c0ce7f Author: Martin K. Petersen Date: Mon Jan 11 03:21:50 2010 -0500 DM: Fix device mapper topology stacking commit b27d7f16d3c6c27345d4280a739809c1c2c4c0b5 upstream. Make DM use bdev_stack_limits() function so that partition offsets get taken into account when calculating alignment. Clarify stacking warnings. Also remove obsolete clearing of final alignment_offset and misalignment flag. Signed-off-by: Martin K. Petersen Signed-off-by: Mike Snitzer Cc: Alasdair G. Kergon Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman commit fbe2992083cc1e865a91a4a101e97c2c35667acf Author: Martin K. Petersen Date: Mon Jan 11 03:21:49 2010 -0500 block: bdev_stack_limits wrapper commit 17be8c245054b9c7786545af3ba3ca4e54cd4ad9 upstream. DM does not want to know about partition offsets. Add a partition-aware wrapper that DM can use when stacking block devices. Signed-off-by: Martin K. Petersen Acked-by: Mike Snitzer Reviewed-by: Alasdair G Kergon Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman commit ed0cd89c7333b17d50812201602f436b57ef1482 Author: Zhao Yakui Date: Fri Jan 8 10:58:20 2010 +0800 drm/i915: try another possible DDC bus for the SDVO device with multiple outputs commit 7c3f0a2726fed78e0e0afe3b6fc3c1f5b298e447 upstream. There exist multiple DDC buses for the SDVO cards with multiple outputs. When we can't get the EDID by using the select DDC bus, we can try the other possible DDC bus to see whether the EDID can be obtained. https://bugs.freedesktop.org/show_bug.cgi?id=23842 Signed-off-by: Zhao Yakui Tested-by: Sebastien Caty Signed-off-by: Eric Anholt Signed-off-by: Greg Kroah-Hartman commit 4fb77a3f85d3e4633e6ef3a8b319f882caf7c623 Author: Zhao Yakui Date: Fri Jan 8 10:58:19 2010 +0800 drm/i915: Read the response after issuing DDC bus switch command commit 6a304caf0bf9c429fc261f260b86cabf5bde2cbb upstream. For some SDVO cards based on conexant chip, we can't read the EDID if we don't read the response after issuing SDVO DDC bus switch command. From the SDVO spec once when another I2C transaction is finished after completing the I2C transaction of issuing the bus switch command, it will be switched back to the SDVO internal state again. So we can't initiate a new I2C transaction to read the response after issuing the DDC bus switch command. Instead we should issue DDC bus switch command and read the response in the same I2C transaction. https://bugs.freedesktop.org/show_bug.cgi?id=23842 https://bugs.freedesktop.org/show_bug.cgi?id=24458 https://bugs.freedesktop.org/show_bug.cgi?id=24522 https://bugs.freedesktop.org/show_bug.cgi?id=24282 Signed-off-by: Zhao Yakui Tested-by: Sebastien Caty Signed-off-by: Eric Anholt Signed-off-by: Greg Kroah-Hartman commit 8cef765ff1eafb77cc40e8dad7a7a00190d9a6fc Author: James Bottomley Date: Thu Nov 26 09:50:20 2009 -0600 SCSI: enclosure: fix oops while iterating enclosure_status array commit cc9b2e9f6603190c009e5d2629ce8e3f99571346 upstream. Based on patch originally by Jeff Mahoney enclosure_status is expected to be a NULL terminated array of strings but isn't actually NULL terminated. When writing an invalid value to /sys/class/enclosure/.../.../status, it goes off the end of the array and Oopses. Fix by making the assumption true and adding NULL at the end. Reported-by: Artur Wojcik Signed-off-by: James Bottomley Signed-off-by: Greg Kroah-Hartman commit 5f0ab2dfbf84454894568377e4dd6578ef3938f3 Author: Alexey Starikovskiy Date: Wed Dec 30 15:53:10 2009 +0300 ACPI: EC: Add wait for irq storm commit 54070101f86ca9a6e9ba243c999d144721ec3db7 upstream. Merge of poll and irq modes accelerated EC transaction, so that keyboard starts to suffer again. Add msleep(1) into transaction path for the storm to allow keyboard controller to do its job. Reference: http://bugzilla.kernel.org/show_bug.cgi?id=14747 Signed-off-by: Alexey Starikovskiy Signed-off-by: Len Brown Cc: François Valenduc Signed-off-by: Greg Kroah-Hartman commit 1ff7b99e4983d9e93d25e98ba1ce303ad4e4909e Author: Alexey Starikovskiy Date: Thu Dec 24 11:34:16 2009 +0300 ACPI: EC: Accelerate query execution commit a62e8f1978f49e52f87a711ff6711b323d4b12ff upstream. Split EC query handling into acknowledge and execution phase. This allows much smaller pending query lattency and lowers chances of EC going "wild" and losing events. Reference: http://bugzilla.kernel.org/show_bug.cgi?id=14858 Signed-off-by: Alexey Starikovskiy Signed-off-by: Len Brown Cc: François Valenduc Signed-off-by: Greg Kroah-Hartman commit 111ab4bcb4a3c6d803f4cefde0c910de1fdbfc90 Author: Greg Kroah-Hartman Date: Thu Jan 14 10:33:19 2010 -0800 USB: add speed values for USB 3.0 and wireless controllers commit b132b04e193908a94d95065d0628f8fb0159cc55 upstream. These controllers say "unknown" for their speed in sysfs, which obviously isn't correct. Reported-by: Kurt Garloff Cc: Sarah Sharp Cc: David Vrabel Signed-off-by: Greg Kroah-Hartman commit a2a5b33aa3675f267259604218d0663b9778227f Author: Alan Stern Date: Fri Jan 8 11:18:38 2010 -0500 USB: add missing delay during remote wakeup commit 49d0f078f494b9d81e820a13dd8093a9bfb0b6b1 upstream. This patch (as1330) fixes a bug in khbud's handling of remote wakeups. When a device sends a remote-wakeup request, the parent hub (or the host controller driver, for directly attached devices) begins the resume sequence and notifies khubd when the sequence finishes. At this point the port's SUSPEND feature is automatically turned off. However the device needs an additional 10-ms resume-recovery time (TRSMRCY in the USB spec). Khubd does not wait for this delay if the SUSPEND feature is off, and as a result some devices fail to behave properly following a remote wakeup. This patch adds the missing delay to the remote-wakeup path. It also extends the resume-signalling delay used by ehci-hcd and uhci-hcd from 20 ms (the value in the spec) to 25 ms (the value we use for non-remote-wakeup resumes). The extra time appears to help some devices. Signed-off-by: Alan Stern Cc: Rickard Bellini Signed-off-by: Greg Kroah-Hartman commit bfec5cee7784fdc9c07c9ef72312dbad0bff5690 Author: Alan Stern Date: Fri Jan 8 11:18:20 2010 -0500 USB: EHCI & UHCI: fix race between root-hub suspend and port resume commit cec3a53c7fe794237b582e8e77fc0e48465e65ee upstream. This patch (as1321) fixes a problem with EHCI and UHCI root-hub suspends: If the suspend occurs while a port is trying to resume, the resume doesn't finish and simply gets lost. When remote wakeup is enabled, this is undesirable behavior. The patch checks first to see if any port resumes are in progress, and if they are then it fails the root-hub suspend with -EBUSY. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 07d577f8868a40466bf3044d8911c06cc7dc283e Author: Alan Stern Date: Fri Jan 8 11:17:55 2010 -0500 USB: EHCI: fix handling of unusual interrupt intervals commit 1b9a38bfa6e664ff02511314f5586d711c83cc91 upstream. This patch (as1320) fixes two problems related to interrupt-URB scheduling in ehci-hcd. URBs with an interval of 2 or 4 microframes aren't handled. For the time being, the patch reduces to interval to 1 uframe. URBs are constrained to have an interval no larger than 1024 frames by usb_submit_urb(). But some EHCI controllers allow use of a schedule as short as 256 frames; for these controllers we may have to decrease the interval to the actual schedule length. The second problem isn't very significant since few devices expose interrupt endpoints with an interval larger than 256 frames. But the first problem is critical; it will prevent the kernel from working with devices having interrupt intervals of 2 or 4 uframes. Signed-off-by: Alan Stern Tested-by: Glynn Farrow Signed-off-by: Greg Kroah-Hartman commit 186c74d336e2c1377df9e5dc88f7966b2dd6acf7 Author: Oliver Neukum Date: Tue Jan 12 12:32:50 2010 +0100 USB: Don't use GFP_KERNEL while we cannot reset a storage device commit acbe2febe71abb2360b008e9ab3ee5c44169f78c upstream. Memory allocations with GFP_KERNEL can cause IO to a storage device which can fail resulting in a need to reset the device. Therefore GFP_KERNEL cannot be safely used between usb_lock_device() and usb_unlock_device(). Replace by GFP_NOIO. Signed-off-by: Oliver Neukum Cc: Alan Stern Signed-off-by: Greg Kroah-Hartman commit fa68188da8abe7c20cf44f19326c81a74498b921 Author: Alan Stern Date: Tue Dec 22 23:16:32 2009 -0500 USB: fix bitmask merge error commit a91b593edd4b3e8aa91f671b763b27b8119eb49d upstream. This patch adds a mask bit which was mistakenly omitted from the as1311 patch (usb-storage: add BAD_SENSE flag). Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 911b8be09d303ee5c63295be2ad7b39eec899f45 Author: Johan Hovold Date: Wed Jan 6 15:48:42 2010 -0800 usb: serial: fix memory leak in generic driver commit 2591530204a76fecc843529ade56afe865dd2657 upstream. Fix a regression introduced by commit 715b1dc01fe44537e8fce9566e4bb48d6821d84b ("USB: usb_debug, usb_generic_serial: implement multi urb write"). URB transfer buffer was never freed when using multi-urb writes. Currently the only driver enabling multi-urb writes is usb_debug. Signed-off-by: Johan Hovold Cc: Greg KH Acked-by: Jason Wessel Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 04f7ec720e5bc4413540ca5dedde8b9e5a30c401 Author: Matthew Garrett Date: Wed Dec 9 12:31:37 2009 -0800 serial: 8250_pnp: use wildcard for serial Wacom tablets commit 6d34855d9aa281f72c533ecb827405139d1b0fe9 upstream. Wacom claims that the WACF namespace will always be devoted to serial Wacom tablets. Remove the existing entries and add a wildcard to avoid having to update the kernel every time they add a new device. Signed-off-by: Ping Cheng Signed-off-by: Matthew Garrett Tested-by: Ping Cheng Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 6fc7937a46b9a5d6b7f61005055a856736f31442 Author: Alan Cox Date: Mon Jan 4 16:26:50 2010 +0000 nozomi: quick fix for the close/close bug commit eeec32a731631a9bad9abb21c626b9f2840bee0d upstream. Nozomi goes wrong if you get the sequence open open close [stuff] close which turns out to occur on some ppp type setups. This is a quick patch up for the problem. It's not really fixing Nozomi which completely fails to implement tty open/close semantics and all the other needed stuff. Doing it right is a rather more invasive patch set and not one that will backport. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman commit 8c535426188c312914bebec8158324dbdbdca2d3 Author: Erez Zadok Date: Thu Dec 3 13:35:27 2009 -0500 ecryptfs: initialize private persistent file before dereferencing pointer commit e27759d7a333d1f25d628c4f7caf845c51be51c2 upstream. Ecryptfs_open dereferences a pointer to the private lower file (the one stored in the ecryptfs inode), without checking if the pointer is NULL. Right afterward, it initializes that pointer if it is NULL. Swap order of statements to first initialize. Bug discovered by Duckjin Kang. Signed-off-by: Duckjin Kang Signed-off-by: Erez Zadok Cc: Dustin Kirkland Cc: Al Viro Signed-off-by: Tyler Hicks Signed-off-by: Greg Kroah-Hartman commit 36212162584e722f432f531d7611099e31fe9f3e Author: Dan Carpenter Date: Tue Jan 19 12:34:32 2010 +0300 ecryptfs: use after free commit ece550f51ba175c14ec3ec047815927d7386ea1f upstream. The "full_alg_name" variable is used on a couple error paths, so we shouldn't free it until the end. Signed-off-by: Dan Carpenter Signed-off-by: Tyler Hicks Signed-off-by: Greg Kroah-Hartman commit 179b7e53797c61a7652075eb48c6008dbd2b88d5 Author: Greg Kroah-Hartman Date: Thu Dec 17 07:07:19 2009 -0800 tty: fix race in tty_fasync commit 703625118069f9f8960d356676662d3db5a9d116 upstream. We need to keep the lock held over the call to __f_setown() to prevent a PID race. Thanks to Al Viro for pointing out the problem, and to Travis for making us look here in the first place. Cc: Eric W. Biederman Cc: Al Viro Cc: Alan Cox Cc: Linus Torvalds Cc: Tavis Ormandy Cc: Jeff Dike Cc: Julien Tinnes Cc: Matt Mackall Signed-off-by: Greg Kroah-Hartman commit b70922a1819f26c3962a184070d9370dfae634a9 Author: Greg Kroah-Hartman Date: Fri Jan 8 09:06:40 2010 -0800 Staging: hv: fix smp problems in the hyperv core code commit 7692fd4d441afac728cb83fdd33349d5ba07406c upstream. This fixes a number of SMP problems that were in the hyperv core code. Patch originally written by K. Y. Srinivasan but forward ported to the latest in-kernel code and tweaked slightly by me. Novell, Inc. hereby disclaims all copyright in any derivative work copyright associated with this patch. Signed-off-by: K. Y. Srinivasan Cc: Hank Janssen Cc: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman commit 50e49751f94abb0b79563b69bd31392b8b477a2a Author: Eugeni Dodonov Date: Wed Dec 23 10:27:22 2009 -0200 Staging: asus_oled: fix oops in 2.6.32.2 commit 20633bf0141c5e93e3396770d5eb7d200ee4068a upstream. After updating to 2.6.32 kernel, I started experiencing Oopses caused by the asus_oled module. After quick investigation, I wrapped this simple patch which fixes an Oops in by asus_oled module on 2.6.32.2 kernel, caused by incorrect usage of strict_strtoul function call within set_enabled and set_disabled functions. This can be triggered by simple running the userspace client for asus_old (e.g., 'asusoled -e' or 'asusoled -d'). Signed-off-by: Eugeni Dodonov Signed-off-by: Greg Kroah-Hartman commit ccb90b8b6aae814987b23d60d13b4d32dc03a389 Author: Jean-Francois Moine Date: Sun Jan 10 04:32:11 2010 -0300 V4L/DVB (13900): gspca - sunplus: Fix bridge exchanges. commit 07d1c69b2dcfdd1b21e36af0ff8b9506234908ee upstream. A previous code optimization inverted bridge registers and values, doing a regression in kernel 2.6.32. Signed-off-by: Jean-Francois Moine Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman commit d547e913ca2e6ec29510cca3e72a3cc430e53b89 Author: H. Peter Anvin Date: Tue Dec 15 15:13:07 2009 -0800 x86, msr/cpuid: Register enough minors for the MSR and CPUID drivers commit 0b962d473af32ec334df271b54ff4973cb2b4c73 upstream. register_chrdev() hardcodes registering 256 minors, presumably to avoid breaking old drivers. However, we need to register enough minors so that we have all possible CPUs. checkpatch warns on this patch, but the patch is correct: NR_CPUS here is a static *upper bound* on the *maximum CPU index* (not *number of CPUs!*) and that is what we want. Reported-and-tested-by: Russ Anderson Cc: Tejun Heo Cc: Alan Cox Cc: Takashi Iwai Cc: Alexander Viro Signed-off-by: H. Peter Anvin LKML-Reference: Signed-off-by: Greg Kroah-Hartman