android_kernel_google_msm/fs
John Stultz 1bc537874e alarmtimers: Squash upstream changes
staging: android-alarm: Switch from wakelocks to wakeup sources

In their current AOSP tree, the Android in-kernel wakelock
infrastructure has been reimplemented in terms of wakeup
sources:
http://git.linaro.org/gitweb?p=people/jstultz/android.git;a=commitdiff;h=e9911f4efdc55af703b8b3bb8c839e6f5dd173bb

The Android alarm driver currently has stubbed out calls
to wakelock functionality. So this patch simply converts
the stubbed out wakelock calls to wakeup source calls, and
removes the empty wakelock macros

Greg, would you mind queuing this in staging-next?

CC: Colin Cross <ccross@android.com>
CC: Arve Hjønnevåg <arve@android.com>
CC: Greg KH <gregkh@linuxfoundation.org>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Staging: android: alarm: Rename pr_alarm to alarm_dbg

Rename a macro to make it explicit it's for debugging.

Use %s: __func__ instead of embedding function names.
Coalesce formats, align arguments.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

staging: Android: Fix NULL pointer related warning in alarm-dev.c file

Fixes the following sparse warning:
drivers/staging/android/alarm-dev.c:259:35: warning: Using plain integer as NULL pointer

Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

staging: android: alarm: remove unnecessary goto statement

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Staging: android: Alarm driver cleanups

Little cleanups. Enum value ANDROID_ALARM_TYPE_COUNT was treated as
an alarm type within a switch statement. That condition was unreachable
though.

Signed-off-by: Dae S. Kim <dae@velatum.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

staging: alarm-dev: Drop pre Android 1.0 _OLD ioctls

Per Colin's comment:
"The "support old userspace code" comment for those two ioctls has
been there since pre-Android 1.0.  Those apis are not exposed to
Android apps, I don't see any problem deleting them."

Thus this patch removes the ANDROID_ALARM_SET_OLD and
ANDROID_ALARM_SET_AND_WAIT_OLD ioctl compatability
logic.

Change-Id: I5138aaa3cdbfb758aaef2cc7591cb5340b3640a0
Cc: Serban Constantinescu <serban.constantinescu@arm.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Colin Cross <ccross@google.com>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

staging: alarm-dev: Refactor alarm-dev ioctl code in prep for compat_ioctl

Cleanup the Android alarm-dev driver's ioctl code to refactor it
in preparation for compat_ioctl support.

Cc: Serban Constantinescu <serban.constantinescu@arm.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Colin Cross <ccross@google.com>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

staging: alarm-dev: Implement compat_ioctl support

Implement compat_ioctl support for the alarm-dev ioctl.

Cc: Serban Constantinescu <serban.constantinescu@arm.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Colin Cross <ccross@google.com>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

staging: alarm-dev: information leak in alarm_ioctl()

Smatch complains that if we pass an invalid clock type then "ts" is
never set.  We need to check for errors earlier, otherwise we end up
passing uninitialized stack data to userspace.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

staging: alarm-dev: information leak in alarm_compat_ioctl()

If we pass an invalid clock type then "ts" is never set.  We need to
check for errors earlier, otherwise we end up passing uninitialized
stack data to userspace.

Reported-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

rtc: alarm: Add power-on alarm feature

Android does not support powering up of phone through alarm.
Adding shutdown hook in alarm driver which will set alarm while phone
is going down so as to power-up the phone after alarm expiration.

Change-Id: Ic2611e33ae9c1f8e83f21efdb93e26ac9f9499de
Signed-off-by: Matthew Qin <yqin@codeaurora.org>

qpnp-rtc: clear alarm register when rtc irq is disabled

The rtc alarm register should be cleared when the rtc irq is
disabled

Change-Id: I97a8bf989ff610093240a6b308a297702da6cb89
Signed-off-by: Xiaocheng Li <lix@codeaurora.org>
Signed-off-by: Matthew Qin <yqin@codeaurora.org>

alarm : Fix the race conditions in alarm-dev.c

There will be race conditions between alarm set and alarm clear if
set_power_on_alarm is out of the lock.But set_power_on_alarm can't
be put into spin_lock. So add it into mutex_lock.

CRs-Fixed: 639115
Change-Id: I4226a95e499211c0d50ff7ce269467a57a410dc7
Signed-off-by: Mao Jinlong <c_jmao@codeaurora.org>

switch timerfd_[sg]ettime(2) to fget_light()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

time: Enable alarmtimers

Change-Id: I4d1ea553aa707ab0467e00dea86cedc8f6797b78
2017-08-25 20:00:02 +03:00
..
9p BACKPORT: posix_acl: Clear SGID bit when setting file permissions 2017-06-26 20:26:17 +03:00
adfs
affs
afs
autofs4 autofs: make the autofsv5 packet file descriptor use a packetized pipe 2012-04-29 13:30:08 -07:00
befs
bfs
btrfs BACKPORT: posix_acl: Clear SGID bit when setting file permissions 2017-06-26 20:26:17 +03:00
cachefiles
ceph Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client 2012-03-28 10:01:29 -07:00
cifs freezer: add unsafe versions of freezable helpers for CIFS 2013-07-12 14:22:55 -07:00
coda Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
configfs
cramfs
crypto ext4/fscrypto: avoid RCU lookup in d_revalidate 2016-10-29 23:12:37 +08:00
debugfs simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
devpts
dlm dlm fixes for 3.4 2012-04-23 18:22:42 -07:00
ecryptfs ecryptfs: don't allow mmap when the lower fs doesn't support it 2017-03-03 16:49:07 -07:00
efs
exofs Merge branch 'for-linus' of git://git.open-osd.org/linux-open-osd 2012-03-28 20:04:27 -07:00
exportfs
ext2 BACKPORT: posix_acl: Clear SGID bit when setting file permissions 2017-06-26 20:26:17 +03:00
ext3 BACKPORT: posix_acl: Clear SGID bit when setting file permissions 2017-06-26 20:26:17 +03:00
ext4 BACKPORT: posix_acl: Clear SGID bit when setting file permissions 2017-06-26 20:26:17 +03:00
f2fs f2fs: sanity check checkpoint segno and blkoff 2017-08-07 18:11:20 -06:00
fat fs: fat: rate limit the kernel messages 2013-02-20 02:49:28 -08:00
freevxfs
fscache
fuse fs: fuse: Add replacment for CMA pages into the LRU cache 2017-06-26 21:01:44 +03:00
gfs2 BACKPORT: posix_acl: Clear SGID bit when setting file permissions 2017-06-26 20:26:17 +03:00
hfs
hfsplus hfsplus: Fix potential buffer overflows 2012-05-04 17:11:24 -07:00
hostfs Merge branch 'for-linus-3.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml 2012-03-27 18:29:53 -07:00
hpfs
hppfs
hugetlbfs mm: larger stack guard gap, between vmas 2017-07-02 13:03:27 +03:00
isofs isofs: Fix infinite looping over CE entries 2017-03-03 12:44:58 -07:00
jbd
jbd2 jbd2: use GFP_NOFS for blkdev_issue_flush 2012-04-23 21:43:41 -04:00
jffs2 BACKPORT: posix_acl: Clear SGID bit when setting file permissions 2017-06-26 20:26:17 +03:00
jfs BACKPORT: posix_acl: Clear SGID bit when setting file permissions 2017-06-26 20:26:17 +03:00
lockd lockd: fix the endianness bug 2012-04-13 13:50:52 -04:00
logfs
minix
ncpfs fs: introduce inode operation ->update_time 2015-07-13 11:17:49 -07:00
nfs freezer: add unsafe versions of freezable helpers for NFS 2013-07-12 14:22:55 -07:00
nfs_common
nfsd nfsd: fix nfs4recover.c printk format warning 2012-04-30 12:28:48 -07:00
nilfs2
nls
notify fs/notify/notification.c: make subsys_initcall function static 2012-03-23 16:58:31 -07:00
ntfs fs: introduce inode operation ->update_time 2015-07-13 11:17:49 -07:00
ocfs2 BACKPORT: posix_acl: Clear SGID bit when setting file permissions 2017-06-26 20:26:17 +03:00
omfs
openpromfs
proc mm: larger stack guard gap, between vmas 2017-07-02 13:03:27 +03:00
pstore Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
qnx4
qnx6
quota Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs 2012-03-28 10:00:14 -07:00
ramfs
reiserfs BACKPORT: posix_acl: Clear SGID bit when setting file permissions 2017-06-26 20:26:17 +03:00
romfs MTD merge for 3.4 2012-03-30 17:31:56 -07:00
squashfs Add an extra mount time sanity check, plus some code cleanups and bug fixes. 2012-03-28 18:05:54 -07:00
sysfs sysfs: handle 'parent deleted before child added' 2012-04-10 14:48:51 -07:00
sysv
ubifs ubifs: Fix compiler warning 2013-02-27 18:10:47 -08:00
udf udf: Check path length when reading symlink 2017-07-10 01:48:57 +03:00
ufs Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
xfs BACKPORT: posix_acl: Clear SGID bit when setting file permissions 2017-06-26 20:26:17 +03:00
yaffs2 fs: yaffs2: Add null pointer check before dereferencing inode 2013-02-27 18:19:17 -08:00
aio.c BACKPORT: aio: mark AIO pseudo-fs noexec 2017-03-03 13:15:25 -07:00
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c VM: add "vm_mmap()" helper function 2012-04-20 17:29:13 -07:00
binfmt_elf.c VM: add "vm_mmap()" helper function 2012-04-20 17:29:13 -07:00
binfmt_elf_fdpic.c VM: add "vm_mmap()" helper function 2012-04-20 17:29:13 -07:00
binfmt_em86.c
binfmt_flat.c VM: add "vm_mmap()" helper function 2012-04-20 17:29:13 -07:00
binfmt_misc.c magic.h: move some FS magic numbers into magic.h 2012-03-23 16:58:31 -07:00
binfmt_script.c
binfmt_som.c VM: add "vm_mmap()" helper function 2012-04-20 17:29:13 -07:00
bio-integrity.c
bio.c bio allocation failure due to bio_get_nr_vecs() 2012-05-11 16:45:12 +02:00
block_dev.c block: don't mark buffers beyond end of disk as mapped 2012-05-11 16:42:14 +02:00
buffer.c block: fix infinite loop in __getblk_slow 2013-03-15 17:09:41 -07:00
char_dev.c
compat.c Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-03-29 18:12:23 -07:00
compat_binfmt_elf.c
compat_ioctl.c fs: Add TTY PM IOCTLs to compat table 2016-10-29 23:08:34 +08:00
dcache.c get rid of ->mnt_longterm 2015-07-13 11:17:44 -07:00
dcookies.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c epoll: use freezable blocking call 2013-07-12 14:22:57 -07:00
exec.c fs/exec.c: account for argv/envp pointers 2017-07-04 01:21:47 +03:00
fcntl.c
fhandle.c vfs: read file_handle only once in handle_to_path 2016-10-29 23:12:11 +08:00
fifo.c
file.c Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-03-29 18:12:23 -07:00
file_table.c brlocks/lglocks: API cleanups 2015-07-13 11:17:41 -07:00
filesystems.c
fs-writeback.c sync: don't block the flusher thread waiting on IO 2016-10-29 23:12:18 +08:00
fs_struct.c get rid of ->mnt_longterm 2015-07-13 11:17:44 -07:00
generic_acl.c BACKPORT: posix_acl: Clear SGID bit when setting file permissions 2017-06-26 20:26:17 +03:00
inode.c fs: introduce inode operation ->update_time 2015-07-13 11:17:49 -07:00
internal.h get rid of ->mnt_longterm 2015-07-13 11:17:44 -07:00
ioctl.c
ioprio.c block: fix use-after-free in sys_ioprio_get() 2016-11-11 13:35:57 +11:00
Kconfig fs crypto: move per-file encryption from f2fs tree to fs/crypto 2016-10-29 23:12:35 +08:00
Kconfig.binfmt
libfs.c dentry leak in simple_fill_super() failure exit 2012-04-09 01:39:22 -04:00
locks.c CIFS: Fix VFS lock usage for oplocked files 2012-04-01 13:54:27 -05:00
Makefile fs crypto: move per-file encryption from f2fs tree to fs/crypto 2016-10-29 23:12:35 +08:00
mbcache.c
mount.h proc: Usable inode numbers for the namespace file descriptors. 2015-07-13 11:18:01 -07:00
mpage.c
namei.c kernel: Fix potential refcount leak in su check 2017-05-19 18:41:42 -06:00
namespace.c mnt: Fail collect_mounts when applied to unmounted mounts 2016-10-31 22:51:16 +11:00
no-block.c
open.c splice: introduce FMODE_SPLICE_READ and FMODE_SPLICE_WRITE 2017-06-26 21:30:22 +03:00
pipe.c pipe: limit the per-user amount of pages allocated in pipes 2016-10-29 23:12:35 +08:00
pnode.c VFS: Make clone_mnt()/copy_tree()/collect_mounts() return errors 2015-07-13 11:17:46 -07:00
pnode.h vfs: Only support slave subtrees across different user namespaces 2015-07-13 11:17:56 -07:00
posix_acl.c BACKPORT: posix_acl: Clear SGID bit when setting file permissions 2017-06-26 20:26:17 +03:00
proc_namespace.c get rid of magic in proc_namespace.c 2015-07-13 11:17:45 -07:00
read_write.c
read_write.h
readdir.c kernel: Only expose su when daemon is running 2017-05-19 18:41:25 -06:00
select.c select: use freezable blocking call 2013-07-12 14:22:58 -07:00
seq_file.c fs/seq_file: Use vmalloc by default for allocations > PAGE_SIZE 2014-11-18 15:13:24 -08:00
signalfd.c
splice.c splice: introduce FMODE_SPLICE_READ and FMODE_SPLICE_WRITE 2017-06-26 21:30:22 +03:00
stack.c
stat.c The following text was taken from the original review request: 2012-03-24 10:24:31 -07:00
statfs.c
super.c The following text was taken from the original review request: 2012-03-24 10:24:31 -07:00
sync.c
timerfd.c alarmtimers: Squash upstream changes 2017-08-25 20:00:02 +03:00
utimes.c
xattr.c fs/xattr.c:setxattr(): improve handling of allocation failures 2012-04-05 15:25:50 -07:00
xattr_acl.c