aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-04-10Merge branch 'master' of git://1984.lsi.us.es/netDavid S. Miller5-20/+24
2012-04-10Revert "ath9k: fix going to full-sleep on PS idle"Sujith Manoharan1-5/+3
This reverts commit c1afdaff90538ef085b756454f12b29575411214. Users have reported connection failures in 3.3.1 and suspend/resume failures in 3.4-rcX. Revert this commit for now - PS IDLE can be fixed in a clean manner later on. Cc: [email protected] Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-10rt2x00: Fix rfkill_polling register function.Chen, Chien-Chia1-5/+1
Move rt2x00rfkill_register(rt2x00dev) to rt2x00lib_probe_dev function. It fixes of starting rfkill_poll function at the right time if sets hard rfkill block and reboot. rt2x00mac_rfkill_poll should be starting before bringing up the wireless interface. Signed-off-by: Chen, Chien-Chia <[email protected]> Acked-by: Helmut Schaa <[email protected]> CC: Kevin Chou <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-10bcma: fix build error on MIPS; implicit pcibios_enable_devicePaul Gortmaker2-1/+2
The following is seen during allmodconfig builds for MIPS: drivers/bcma/driver_pci_host.c:518:2: error: implicit declaration of function 'pcibios_enable_device' [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors make[3]: *** [drivers/bcma/driver_pci_host.o] Error 1 Most likey introduced by commit 49dc9577155576b10ff79f0c1486c816b01f58bf "bcma: add PCIe host controller" Add the header instead of implicitly assuming it will be present. Sounds like a good idea, but that alone doesn't fix anything. The real problem is that the Kconfig has settings related to whether PCI is possible, i.e. config BCMA_HOST_PCI_POSSIBLE bool depends on BCMA && PCI = y default y config BCMA_HOST_PCI bool "Support for BCMA on PCI-host bus" depends on BCMA_HOST_PCI_POSSIBLE ...but what is missing is that BCMA_DRIVER_PCI_HOSTMODE doesn't have any dependencies on the above. Add one. CC: Hauke Mehrtens <[email protected]> CC: John W. Linville <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]> Acked-by: Hauke Mehrtens <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparcLinus Torvalds3-27/+60
Pull sparc fixes from David Miller: 1) Build fix for LEON, from Sam Ravnborg. 2) Make the sparc side changes that go along with the infrastructure to retry faults when blocking on a disk transfer. From Kautuk Consul. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc32,leon: fix leon build sparc/mm/fault_32.c: Port OOM changes to do_sparc_fault sparc/mm/fault_64.c: Port OOM changes to do_sparc64_fault
2012-04-10Merge tag 'regulator-3.4' of ↵Linus Torvalds1-3/+3
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull a regulator build fix from Mark Brown: "Fix a build warning in the anatop driver for 3.4 This is a trivial rename to stop the build system complaining that we're referencing things we shouldn't be." * tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: anatop: fix 'anatop_regulator' name collision
2012-04-10drm/i915: properly compute dp dithering for user-created modesDaniel Vetter1-14/+35
We've only computed whether we need to fall back to 6bpc due to dp link bandwidth constrains in mode_valid, but not mode_fixup. Under various circumstances X likes to create new modes which then lack proper 6bpc flags (if required), resulting in mode_fixup failures and ultimately black screens. Chris Wilson pointed out that we still get things wrong for bpp > 24, but that should be fixed in another patch (and it'll be easier because this patch consolidates the logic). The likely culprit for this regression is commit 3d794f87238f74d80e78a7611c7fbde8a54c85c2 Author: Keith Packard <[email protected]> Date: Wed Jan 25 08:16:25 2012 -0800 drm/i915: Force explicit bpp selection for intel_dp_link_required v2: Fix indentation and tune down the too bold claim that this should fix the world. Both noticed by Chris Wilson. v3: Try to really git add things. Reported-and-tested-by: Brice Goglin <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48170 Cc: [email protected] Reviewed-by: Adam Jackson <[email protected]> Signed-Off-by: Daniel Vetter <[email protected]>
2012-04-10staging/xgifb: fix display on XGI Volari Z11m cardsDmitry Eremin-Solenikov3-2/+18
Image on Z11m cards was totally garbled due to wrong memory being selected. Add a special handling for Z11m cards. Tested on PCIe Z11 and Z11m cards. Signed-off-by: Dmitry Eremin-Solenikov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-10Staging: android: timed_gpio: Fix resource leak in timed_gpio_probe error pathsAxel Lin1-12/+15
If gpio_request fails, we need to free all allocated resources. Current code uses wrong array index to access gpio_data array. So current code actually frees gpio_data[i].gpio by j times. This patch moves the error handling code to err_out and thus improves readability. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-10android: make persistent_ram based drivers depend on HAVE_MEMBLOCKColin Cross1-1/+2
m68k doesn't have memblock_reserve, which causes a build failure with allmodconfig. Make PERSISTENT_RAM and RAM_CONSOLE depend on HAVE_MEMBLOCK. Reported-by: Geert Uytterhoeven <[email protected]> Reported-by: Paul Gortmaker <[email protected]> Signed-off-by: Colin Cross <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-10staging: iio: ak8975: Remove i2c client data corruptionPreetham Chandru1-3/+5
i2c client data set is of type struct indio_dev pointer and hence the pointer returned from i2c_get_clientdata() should be assigned to an object of type struct indio_dev and not to an object of type struct ak8975_data. Also in ak8975_probe() client data should be set first before calling ak8975_setup() as it references the client data. Signed-off-by: Preetham Chandru R <[email protected]> CC: Laxman Dewangan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-10staging: drm/omap: move where DMM driver is registeredRob Clark1-3/+4
Not sure what triggered the change in behavior, but seems to result in recursively acquiring a mutex and hanging on boot. But omap_drm_init() seems a much more sane place to register the driver for the DMM sub-device. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-10staging: zsmalloc: fix memory leakNitin Gupta1-12/+18
This patch fixes a memory leak in zsmalloc where the first subpage of each zspage is leaked when the zspage is freed. Signed-off-by: Nitin Gupta <[email protected]> Acked-by: Seth Jennings <[email protected]> Acked-by: Dan Magenheimer <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-10Staging: rts_pstor: off by one in for loopDan Carpenter1-1/+2
I already fixed the other similar for loop in this file. I'm not sure how I missed this one. We use seg_no+1 inside the loop so we can't go right up to the end of the loop. Also if we don't break out of the loop then we end up past the end of the array, but with this fix we end up on the last element. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-10staging: ozwpan: Added new maintainer for ozwpanChris Kelly2-1/+4
Added Rupesh Gujare to MAINTAINERS file and contact in TODO file for ozwpan driver. Signed-off-by: Chris Kelly <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-10staging:rts_pstor:Avoid "Bad target number" message when probing driverwwang1-0/+5
Avoid "Bad LUN" and "Bad target number" message by setting the supported max_lun and max_id for the scsi host Signed-off-by: wwang <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-10staging:rts_pstor:Fix possible panic by NULL pointer dereferencewwang1-5/+6
rtsx_transport.c (rtsx_transfer_sglist_adma_partial): pointer struct scatterlist *sg, which is mapped in dma_map_sg, is used as an iterator in later transfer operation. It is corrupted and passed to dma_unmap_sg, thus causing fatal unmap of some erroneous address. Fix it by duplicating *sg_ptr for iterating. Signed-off-by: wwang <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-10Staging: vt6655-6: check keysize before memcpy()Dan Carpenter2-0/+6
We need to check the we don't copy too much memory. This comes from a copy_from_user() in the ioctl. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-10staging/media/as102: Don't call release_firmware() on uninitialized variableJesper Juhl1-1/+1
If, in drivers/staging/media/as102/as102_fw.c::as102_fw_upload(), the call cmd_buf = kzalloc(MAX_FW_PKT_SIZE, GFP_KERNEL); should fail and return NULL so that we jump to the 'error:' label, then we'll end up calling 'release_firmware(firmware);' with 'firmware' still uninitialized - not good. The easy fix is to just initialize 'firmware' to NULL when we declare it, since release_firmware() deals gracefully with being passed NULL pointers. Signed-off-by: Jesper Juhl <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-10staging:iio:core add missing increment of loop index in ↵Lothar Waßmann1-0/+1
iio_map_array_unregister() staging:iio:core add missing increment of loop index in iio_map_array_unregister() Signed-off-by: Lothar Waßmann <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-10staging: ramster: unbreak my heartDan Magenheimer1-5/+1
The just-merged ramster staging driver was dependent on a cleanup patch in cleancache, so was marked CONFIG_BROKEN until that patch could be merged. That cleancache patch is now merged (and the correct SHA of the cleancache patch is 3167760f83899ccda312b9ad9306ec9e5dda06d4 rather than the one shown in the comment removed in the patch below). So remove the CONFIG_BROKEN now and the comment that is no longer true... Signed-off-by: Dan Magenheimer <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-10staging/vme: Fix module parametersGerard Snitselaar1-2/+2
loopback should be declared bool, and variant probably shouldn't be const. Signed-off-by: Gerard Snitselaar <[email protected]> Acked-by: Martyn Welch <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-10staging: sep: Fix sign of errorAlan Cox1-3/+3
One of our errors wasn't negative as intended. Fix this. (Found by Hillf Danton) While we are at it turn user causable messages down to dev_dbg level in the ioctl paths. Signed-off-by: Alan Cox <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-10Input: gpio_mouse - use linux/gpio.h rather than asm/gpio.hMark Brown1-1/+1
Direct usage of the asm include has long been deprecated by the introduction of gpiolib. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2012-04-10ARM: EXYNOS: Add PDMA and MDMA physical base address definesThomas Abraham2-1/+5
Add PDMA and MDMA physical base address macros which is require for EXYNOS5 of_dev_auxdata setup. Signed-off-by: Thomas Abraham <[email protected]> [[email protected]: changed dma channel fo mdma1] Signed-off-by: Kukjin Kim <[email protected]>
2012-04-10ARM: S5PV210: Fix compiler warning in dma.c fileSachin Kamat1-2/+0
Fixes the following warning: warning: 'dma_dmamask' defined but not used [-Wunused-variable] Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Kukjin Kim <[email protected]>
2012-04-10Merge branch 'for-3.4-rc3' of ↵Linus Torvalds11-205/+110
git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML fixes from Richard Weinberger. * 'for-3.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: uml_setup_stubs': warning: unused variable 'pages' um: Use asm-generic/switch_to.h um: Disintegrate asm/system.h um: switch cow_user.h to htobe{32,64}/betoh{32,64} um: several x86 hw-dependent crypto modules won't build on uml um: fix linker script generation
2012-04-10i2c: prevent spurious interrupt on Designware controllersKristen Carlson Accardi1-1/+0
Don't call i2c_enable on resume because it causes a spurious interrupt. Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Kirill A. Shutemov <[email protected]> Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-04-10ALSA: hda - hide HDMI/ELD printks unless snd.debug=2Fengguang Wu3-8/+17
Also remove two warnings when CONFIG_SND_DEBUG is not set: sound/pci/hda/patch_hdmi.c: In function ‘hdmi_intrinsic_event’: sound/pci/hda/patch_hdmi.c:761:6: warning: unused variable ‘eldv’ [-Wunused-variable] sound/pci/hda/patch_hdmi.c:760:6: warning: unused variable ‘pd’ [-Wunused-variable] Signed-off-by: Wu Fengguang <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2012-04-10GFS2: Allow caching of rindex glockBob Peterson1-2/+2
This patch allows caching of the rindex glock. We were previously setting the GL_NOCACHE bit when the glock was released. That forced the rindex inode to be invalidated, which caused us to re-read rindex at the next access. However, it caused the glock to be unnecessarily bounced around the cluster. This patch allows the glock to remain cached, but it still causes the rindex to be re-read once it has been written to by gfs2_grow. Ben and I have tested single-node gfs2_grow cases and I've tested clustered gfs2_grow cases on my four-node cluster. Signed-off-by: Bob Peterson <[email protected]> Signed-off-by: Steven Whitehouse <[email protected]>
2012-04-10netfilter: nf_conntrack: fix incorrect logic in nf_conntrack_init_netGao feng1-1/+1
in function nf_conntrack_init_net,when nf_conntrack_timeout_init falied, we should call nf_conntrack_ecache_fini to do rollback. but the current code calls nf_conntrack_timeout_fini. Signed-off-by: Gao feng <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
2012-04-10netfilter: nf_ct_ipv4: packets with wrong ihl are invalidJozsef Kadlecsik1-0/+8
It was reported that the Linux kernel sometimes logs: klogd: [2629147.402413] kernel BUG at net / netfilter / nf_conntrack_proto_tcp.c: 447! klogd: [1072212.887368] kernel BUG at net / netfilter / nf_conntrack_proto_tcp.c: 392 ipv4_get_l4proto() in nf_conntrack_l3proto_ipv4.c and tcp_error() in nf_conntrack_proto_tcp.c should catch malformed packets, so the errors at the indicated lines - TCP options parsing - should not happen. However, tcp_error() relies on the "dataoff" offset to the TCP header, calculated by ipv4_get_l4proto(). But ipv4_get_l4proto() does not check bogus ihl values in IPv4 packets, which then can slip through tcp_error() and get caught at the TCP options parsing routines. The patch fixes ipv4_get_l4proto() by invalidating packets with bogus ihl value. The patch closes netfilter bugzilla id 771. Signed-off-by: Jozsef Kadlecsik <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
2012-04-10clockevents: tTack broadcast device mode change in ↵Suresh Siddha1-1/+3
tick_broadcast_switch_to_oneshot() In the commit 77b0d60c5adf39c74039e2142a1d3cd1e4d53799, "clockevents: Leave the broadcast device in shutdown mode when not needed", we were bailing out too quickly in tick_broadcast_switch_to_oneshot(), with out tracking the broadcast device mode change to 'TICKDEV_MODE_ONESHOT'. This breaks the platforms which need broadcast device oneshot services during deep idle states. tick_broadcast_oneshot_control() thinks that it is in periodic mode and fails to take proper decisions based on the CLOCK_EVT_NOTIFY_BROADCAST_[ENTER, EXIT] notifications during deep idle entry/exit. Fix this by tracking the broadcast device mode as 'TICKDEV_MODE_ONESHOT', before leaving the broadcast HW device in shutdown mode if there are no active requests for the moment. Reported-and-tested-by: Santosh Shilimkar <[email protected]> Signed-off-by: Suresh Siddha <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2012-04-10drm/radeon/kms: fix DVO setup on some r4xx chipsAlex Deucher1-0/+4
Some r4xx chips have the wrong frev in the DVOEncoderControl table. It should always be 1 on r4xx. Fixes modesetting on DVO on r4xx chips with the bad frev. Reported by twied on #radeon. Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2012-04-10drm/savage: fix integer overflows in savage_bci_cmdbuf()Xi Wang1-3/+3
Since cmdbuf->size and cmdbuf->nbox are from userspace, a large value would overflow the allocation size, leading to out-of-bounds access. Signed-off-by: Xi Wang <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-04-10drm/radeon: replace udelay with mdelay for long timeoutsArnd Bergmann6-27/+27
Some architectures require that delays longer than a few miliseconds are called through mdelay. This was triggered on ARM randconfig builds. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-04-10itimer: Use printk_once instead of WARN_ONCEThomas Gleixner1-3/+4
David pointed out, that WARN_ONCE() to report usage of an deprecated misfeature make folks unhappy. Use printk_once() instead. Andrew told me to stop grumbling and to remove the silly typecast while touching the file. Reported-by: David Rientjes <[email protected]> Cc: Andrew Morton <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
2012-04-10ARM: 7377/1: vic: re-read status register before dispatching each IRQ handlerWill Deacon1-5/+4
handle_IRQ may briefly cause interrupts to be re-enabled during soft IRQ processing on the exit path, leading to nested handling of VIC interrupts. Since the current code does not re-read the VIC_IRQ_STATUS register, this can lead to multiple invocations of the same interrupt handler and spurious interrupts to be reported. This patch changes the VIC interrupt dispatching code to re-read the status register each time, avoiding duplicate invocations of the same handler. Acked-and-Tested-by: H Hartley Sweeten <[email protected]> Reviewed-by: Jamie Iles <[email protected]> Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Russell King <[email protected]>
2012-04-10ARM: 7368/1: fault.c: correct how the tsk->[maj|min]_flt gets incrementedKautuk Consul1-1/+1
commit 8878a539ff19a43cf3729e7562cd528f490246ae was done by me to make the page fault handler retryable as well as interruptible. Due to this commit, there is a mistake in the way in which tsk->[maj|min]_flt counter gets incremented for VM_FAULT_ERROR: If VM_FAULT_ERROR is returned in the fault flags by handle_mm_fault, then either maj_flt or min_flt will get incremented. This is wrong as in the case of a VM_FAULT_ERROR we need to be skip ahead to the error handling code in do_page_fault. Added a check after the call to __do_page_fault() to check for (fault & VM_FAULT_ERROR). Signed-off-by: Kautuk Consul <[email protected]> Signed-off-by: Russell King <[email protected]>
2012-04-10Input: trackpoint - use psmouse_fmt() for messagesJJ Ding1-6/+8
Use psmouse_*() macros introduced in commit b5d21704361ee. Signed-off-by: JJ Ding <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2012-04-10Input: elantech - v4 is a clickpad, with only one buttonJJ Ding1-2/+4
Add pointer and buttonpad properties for v4 hardware. Also, Jachiet reported that on Asus UX31, right button has no effect. It turns out v4 has only one button, the right-button effect is implemented with software when Windows driver is installed, or in firmware when touchpad is in relative mode. So remove BTN_RIGHT while at it. Reported-by: Jachiet Louis <[email protected]> Signed-off-by: JJ Ding <[email protected]> Reviewed-by: Chase Douglas <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2012-04-10Input: elantech - reset touchpad before configuring itJJ Ding1-0/+4
Acer VH40 has a Fn key toggling the touchpad on and off, but it's implemented in system firmware, and the EC chip has to receive reset command to activate this function. Also when this machine wakes up after resume, psmouse_reset is necessary to bring the touchpad back on. Signed-off-by: JJ Ding <[email protected]> Reviewed-by: Chase Douglas <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2012-04-10powerpc: Fix page fault with lockdep regressionBenjamin Herrenschmidt1-18/+21
commit a546498f3bf9aac311c66f965186373aee2ca0b0 introduced a regression on 32-bit when irq tracing is enabled by exposing an old bug in our irq tracing code for exception entry. The code would save and restore some GPRs around the calls to the C lockdep code, however, it tries to be too smart for its own good and restores some of the GPRs from the exception frame (as saved there on exception entry). However, for page faults, we do replace those GPRs with arguments to do_page_fault before we call transfer_to_handler and so restoring from the exception frame is plain wrong in this case. This was fine as long as we didn't touch the interrupt state when taking page fault, but when I started doing it, it would trigger the lockdep calls and the bug. This fixes it by cleaning up that code a bit. It did create a small stack frame for the sake of backtraces, so let's make it a bit bigger and use it to save and restore the stuff we care about. Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2012-04-10ALSA: sound/isa/sscape.c: add missing resource-release codeJulia Lawall1-2/+4
At the point of this error-handling code, both regions and the dma have been allocated, so free it as done in previous and subsequent error-handling code. Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2012-04-10sound: sound/oss/msnd_pinnacle.c: add vfreesJulia Lawall1-2/+6
At the point of this error-handling code, HAVE_DSPCODEH may be undefined, so free INITCODE and PERMCODE as done elsewhere. A jump and label are introduced to avoid code duplication. Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2012-04-09modpost: Fix modpost license checking of vmlinux.oFrank Rowand2-2/+6
Commit f02e8a6596b7 ("module: Sort exported symbols") sorts symbols placing each of them in its own elf section. This sorting and merging into the canonical sections are done by the linker. Unfortunately modpost to generate Module.symvers file parses vmlinux.o (which is not linked yet) and all modules object files (which aren't linked yet). These aren't sanitized by the linker yet. That breaks modpost that can't detect license properly for modules. This patch makes modpost aware of the new exported symbols structure. [ This above is a slightly corrected version of the explanation of the problem, copied from commit 62a2635610db ("modpost: Fix modpost's license checking V3"). That commit fixed the problem for module object files, but not for vmlinux.o. This patch fixes modpost for vmlinux.o. ] Signed-off-by: Frank Rowand <[email protected]> Signed-off-by: Alessio Igor Bogani <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-04-09android, lowmemorykiller: remove task handoff notifierDavid Rientjes1-41/+7
The task handoff notifier leaks task_struct since it never gets freed after the callback returns NOTIFY_OK, which means it is responsible for doing so. It turns out the lowmemorykiller actually doesn't need this notifier at all. It's used to prevent unnecessary killing by waiting for a thread to exit as a result of lowmem_shrink(), however, it's possible to do this in the same way the kernel oom killer works by setting TIF_MEMDIE and avoid killing if we're still waiting for it to exit. The kernel oom killer will already automatically set TIF_MEMDIE for threads that are attempting to allocate memory that have a fatal signal. The thread selected by lowmem_shrink() will have such a signal after the lowmemorykiller sends it a SIGKILL, so this won't result in an unnecessary use of memory reserves for the thread to exit. This has the added benefit that we don't have to rely on CONFIG_PROFILING to prevent needlessly killing tasks. Reported-by: Werner Landgraf <[email protected]> Cc: [email protected] Signed-off-by: David Rientjes <[email protected]> Acked-by: Colin Cross <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-04-09UHCI: hub_status_data should indicate if ports are resumingAlan Stern1-2/+3
This patch (as1538) causes uhci_hub_status_data() to return a nonzero value when any port is undergoing a resume transition while the root hub is suspended. This will allow usbcore to handle races between root-hub suspend and port wakeup. Signed-off-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-09EHCI: keep track of ports being resumed and indicate in hub_status_dataAlan Stern4-15/+23
This patch (as1537) adds a bit-array to ehci-hcd for keeping track of which ports are undergoing a resume transition. If any of the bits are set when ehci_hub_status_data() is called, the routine will return a nonzero value even if no ports have any status changes pending. This will allow usbcore to handle races between root-hub suspend and port wakeup. Signed-off-by: Alan Stern <[email protected]> CC: Sarah Sharp <[email protected]> CC: Chen Peter-B29397 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-09USB: fix race between root-hub suspend and remote wakeupAlan Stern1-0/+12
This patch (as1533) fixes a race between root-hub suspend and remote wakeup. If a wakeup event occurs while a root hub is suspending, it might not cause the suspend to fail. Although the host controller drivers check for pending wakeup events at the start of their bus_suspend routines, they generally do not check for wakeup events while the routines are running. In addition, if a wakeup event occurs any time after khubd is frozen and before the root hub is fully suspended, it might not cause a system sleep transition to fail. For example, the host controller drivers do not fail root-hub suspends when a connect-change event is pending. To fix both these issues, this patch causes hcd_bus_suspend() to query the controller driver's hub_status_data method after a root hub is suspended, if the root hub is enabled for wakeup. Any pending status changes will count as wakeup events, causing the root hub to be resumed and the overall suspend to fail with -EBUSY. A significant point is that not all events are reflected immediately in the status bits. Both EHCI and UHCI controllers notify the CPU when remote wakeup begins on a port, but the port's suspend-change status bit doesn't get set until after the port has completed the transition out of the suspend state, some 25 milliseconds later. Consequently, the patch will interpret any nonzero return value from hub_status_data as indicating a pending event, even if none of the status bits are set in the data buffer. Follow-up patches make the necessary changes to ehci-hcd and uhci-hcd. Signed-off-by: Alan Stern <[email protected]> CC: Sarah Sharp <[email protected]> CC: Chen Peter-B29397 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>