tspdrv: Add LG's timed_output based interface

Change-Id: I43383ad9e0ba4e0ba13837c0741885162cf40b63
Revert "tspdrv: Add timed interface"

This reverts commit 24a1d30bb0ac8a20d4c391c0007ec4c209e4b887.

Change-Id: Ibe93191b6b2395236975dbb71efd5755e12eaa3a
Revert LG's changes to madvise

These require use of fallocate, a proper backport of this patch exists...

Change-Id: I67ab473d8308e83d92525c61da84eed6a11ffeae
mm: Hold a file reference in madvise_remove

commit 9ab4233dd08036fe34a89c7dc6f47a8bf2eb29eb upstream.

Otherwise the code races with munmap (causing a use-after-free
of the vma) or with close (causing a use-after-free of the struct
file).

The bug was introduced by commit 90ed52ebe481 ("[PATCH] holepunch: fix
mmap_sem i_mutex deadlock")

Cc: Hugh Dickins <hugh@veritas.com>
Cc: Miklos Szeredi <mszeredi@suse.cz>
Cc: Badari Pulavarty <pbadari@us.ibm.com>
Cc: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[bwh: Backported to 3.2:
 - Adjust context
 - madvise_remove() calls vmtruncate_range(), not do_fallocate()]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>