linux/drivers/staging
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
..
android android, lowmemorykiller: remove task handoff notifier 2012-04-09 20:48:44 -07:00
asus_oled Documentation: remove references to /etc/modprobe.conf 2012-03-30 16:03:15 -07:00
bcm
comedi Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
cptm1217
crystalhd Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
cxt1e1
echo
et131x Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
frontier
ft1000 Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
iio The following text was taken from the original review request: 2012-03-24 10:24:31 -07:00
keucr USB merge for 3.4-rc1 2012-03-20 11:26:30 -07:00
line6
media Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
mei watchdog: fix set_timeout operations 2012-03-27 20:08:09 +02:00
nvec
octeon
olpc_dcon
omapdrm
ozwpan
panel Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
phison
quatech_usb2
quickstart
ramster Merge branch 'kmap_atomic' of git://github.com/congwang/linux 2012-03-21 09:40:26 -07:00
rtl8187se usermodehelper: use UMH_WAIT_PROC consistently 2012-03-23 16:58:41 -07:00
rtl8192e usermodehelper: use UMH_WAIT_PROC consistently 2012-03-23 16:58:41 -07:00
rtl8192u Merge branch 'kmap_atomic' of git://github.com/congwang/linux 2012-03-21 09:40:26 -07:00
rtl8712
rts5139
rts_pstor
sbe-2t3e3 Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
sep
serial
serqt_usb2
slicoss
sm7xx
speakup
ste_rmi4 ARM: More device tree support updates 2012-03-28 12:34:33 -07:00
telephony Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
tidspbridge Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
usbip
vme
vt6655
vt6656
winbond
wlags49_h2 Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
wlags49_h25
wlan-ng
xgifb
zcache Cleanups: rename of flush to invalidate, moving reporting of statistics 2012-03-22 19:52:47 -07:00
zram Merge branch 'kmap_atomic' of git://github.com/congwang/linux 2012-03-21 09:40:26 -07:00
zsmalloc
Kconfig Merge branch 'drm-nouveau-destage' of git://people.freedesktop.org/~airlied/linux 2012-03-22 13:27:02 -07:00
Makefile
staging.c