alistair23-linux/drivers
David Rientjes 83dbbdbb38 android, lowmemorykiller: remove task handoff notifier
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 <w.landgraf@ru.ru>
Cc: stable@vger.kernel.org
Signed-off-by: David Rientjes <rientjes@google.com>
Acked-by: Colin Cross <ccross@android.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-09 20:48:44 -07:00
..
accessibility
acpi Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-04-06 19:56:04 -07:00
amba
ata
atm
auxdisplay
base regmap: A couple of small fixes for 3.4 2012-04-07 09:56:00 -07:00
bcma
block Two fixes for regressions: 2012-04-06 17:54:53 -07:00
bluetooth Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
cdrom
char Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2012-04-06 17:56:20 -07:00
clk
clocksource Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2012-03-29 16:53:48 -07:00
connector
cpufreq ARM: SoC fixes for 3.4-rc2 2012-04-05 22:13:39 -07:00
cpuidle Merge branches 'idle-fix' and 'misc' into release 2012-04-06 21:48:59 -04:00
crypto
dca
devfreq
dio
dma Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
edac Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2012-04-06 17:56:20 -07:00
eisa
firewire
firmware
gpio gpio: tegra: Iterate over the correct number of banks 2012-04-04 13:13:18 -06:00
gpu Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
hid simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
hsi
hv
hwmon hwmon: (ad7314) Adds missing spi_dev initialization 2012-04-03 17:08:28 -07:00
hwspinlock
i2c
ide
idle simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
ieee802154
infiniband
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2012-03-29 23:17:44 -07:00
iommu Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-04-02 17:53:39 -07:00
leds
lguest
macintosh
mca
md md/raid1,raid10: don't compare excess byte during consistency check. 2012-04-03 15:39:23 +10:00
media ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
memstick
message
mfd Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
misc Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
mmc mmc: use really long write timeout to deal with crappy cards 2012-04-05 20:32:34 -04:00
mtd Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
net Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2012-04-06 17:56:20 -07:00
nfc
nubus
of
oprofile simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
parisc
parport
pci Two fixes for regressions: 2012-04-06 17:54:53 -07:00
pcmcia Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia 2012-03-29 16:00:48 -07:00
pinctrl
platform Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-03-30 16:45:39 -07:00
pnp Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-03-30 16:45:39 -07:00
power Various small bugfixes and enhancements, plus two new drivers: 2012-03-30 16:09:02 -07:00
pps
ps3
ptp
rapidio
regulator regulator: Fixes for -rc1 2012-04-04 10:09:30 -07:00
remoteproc simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
rpmsg
rtc Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
s390
sbus
scsi Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
sfi
sh SuperH updates for 3.4 merge window 2012-03-30 00:09:17 -07:00
sn
spi Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
ssb
staging android, lowmemorykiller: remove task handoff notifier 2012-04-09 20:48:44 -07:00
target tcm_fc: Do not free tpg structure during wq allocation failure 2012-04-06 18:57:05 -07:00
tc
thermal
tty SuperH updates for 3.4-rc1 2012-04-07 09:52:46 -07:00
uio
usb ARM: SoC fixes for 3.4-rc2 2012-04-05 22:13:39 -07:00
uwb simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
vhost
video ARM: SoC fixes for 3.4-rc2 2012-04-05 22:13:39 -07:00
virt
virtio virtio-pci: switch to PM ops macro to initialise PM functions 2012-03-31 08:09:51 +05:30
vlynq
w1
watchdog ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
xen Two fixes for regressions: 2012-04-06 17:54:53 -07:00
zorro
Kconfig Merge branch 'for-next' of git://gitorious.org/kernel-hsi/kernel-hsi 2012-04-02 09:50:40 -07:00
Makefile Merge branch 'for-next' of git://gitorious.org/kernel-hsi/kernel-hsi 2012-04-02 09:50:40 -07:00