Android lowmemorykiller updates

commit 744af139eccb23786b397da8bcc2a06638610e4a
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Wed Mar 7 13:21:23 2012 -0800

    Staging: android: lowmemorykiller.c

    Fix compiler warning about the type of the module parameter.

    Cc: San Mehat <san@google.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1e90c6f2b3c99ec8715ce4f3d19664df317fe573
Author: Anton Vorontsov <anton.vorontsov@linaro.org>
Date:   Mon Feb 6 20:30:01 2012 +0400

    staging: android/lowmemorykiller: Do not kill kernel threads

    LMK should not try killing kernel threads.

    Suggested-by: Oleg Nesterov <oleg@redhat.com>
    Reviewed-by: Oleg Nesterov <oleg@redhat.com>
    Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
    Acked-by: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit ba9891cf5fcc15c5b073d41d5bbaddfde5f2457a
Author: Anton Vorontsov <anton.vorontsov@linaro.org>
Date:   Mon Feb 6 20:29:54 2012 +0400

    staging: android/lowmemorykiller: No need for task->signal check

    task->signal == NULL is not possible, so no need for these checks.

    Suggested-by: Oleg Nesterov <oleg@redhat.com>
    Reviewed-by: Oleg Nesterov <oleg@redhat.com>
    Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
    Acked-by: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 71075cf3e508124622ff5a38c3f061f56339481c
Author: Anton Vorontsov <anton.vorontsov@linaro.org>
Date:   Mon Feb 6 20:29:47 2012 +0400

    staging: android/lowmemorykiller: Better mm handling

    LMK should not directly check for task->mm. The reason is that the
    process' threads may exit or detach its mm via use_mm(), but other
    threads may still have a valid mm. To catch this we use
    find_lock_task_mm(), which walks up all threads and returns an
    appropriate task (with lock held).

    Suggested-by: Oleg Nesterov <oleg@redhat.com>
    Reviewed-by: Oleg Nesterov <oleg@redhat.com>
    Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
    Acked-by: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 0c2535330aff9eb6df643d60a4991db30626786c
Author: faux123 <reioux@gmail.com>
Date:   Thu May 3 20:12:18 2012 -0700

    staging: android/lowmemorykiller: Don't grab tasklist_lock

    Grabbing tasklist_lock has its disadvantages, i.e. it blocks
    process creation and destruction. If there are lots of processes,
    blocking doesn't sound as a great idea.

    For LMK, it is sufficient to surround tasks list traverse with
    rcu_read_{,un}lock().

    >From now on using force_sig() is not safe, as it can race with an
    already exiting task, so we use send_sig() now. As a downside, it
    won't kill PID namespace init processes, but that's not what we
    want anyway.

    Suggested-by: Oleg Nesterov <oleg@redhat.com>
    Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
    Reviewed-by: Oleg Nesterov <oleg@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    modified for HTC kernel from Linux 3.4+ by faux123

commit 4e49f3e82d5604785dbc3d034a025e416e7af0be
Author: Arve Hjønnevåg <arve@android.com>
Date:   Wed Feb 1 15:29:13 2012 -0800

    Staging: android: binder: Fix crashes when sharing a binder file between processes

    Opening the binder driver and sharing the file returned with
    other processes (e.g. by calling fork) can crash the kernel.
    Prevent these crashes with the following changes:
    - Add a mutex to protect against two processes mmapping the
      same binder_proc.
    - After locking mmap_sem, check that the vma we want to access
      (still) points to the same mm_struct.
    - Use proc->tsk instead of current to get the files struct since
      this is where we get the rlimit from.

    Signed-off-by: Arve HjÃ¸nnevÃ¥g <arve@android.com>
    Cc: stable <stable@vger.kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 420862141c01cf0ed89fc6c4aee62ff2e9cf71f9
Author: Arve Hjønnevåg <arve@android.com>
Date:   Fri Jan 20 19:56:21 2012 -0800

    Staging: android: binder: Don't call dump_stack in binder_vma_open

    If user-space partially unmaps the driver, binder_vma_open
    would dump the kernel stack. This is not a kernel bug however
    and will be treated as if the whole area was unmapped once
    binder_vma_close gets called.

    Signed-off-by: Arve HjÃ¸nnevÃ¥g <arve@android.com>
    Cc: stable <stable@vger.kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>