aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorSumit Semwal <sumit.semwal@linaro.org>2015-06-01 12:44:44 +0530
committerAmit Pundir <amit.pundir@linaro.org>2015-06-08 11:13:17 +0530
commit17b3b28baf84999421d56dce68c4b1c1ec7f1ef3 (patch)
tree137bdd42efcd74419ff1344e70bbbc4728d94f5b /kernel
parent05b7504d11ce32148c4f73656936fa34375f377f (diff)
fix: align closely to AOSP.
To support Android on a member platform, LMG carry forwarded quiet a few (200+) aosp/android-3.10 patches to linaro-android-3.14-lsk tree when aosp/android-3.14 was not announced. There are few gaps in our forward-ported branch from 3.10->3.14, and how AOSP is maintaining the patches. This consolidated patch help align our tree with AOSP, unless we've added some fixes. Listed below are file-wise changes and rationale behind them: - arch/arm/Kconfig: c0cc1d84: seccomp revert is missing from AOSP, potentially because of cleaner seccomp patches => Align with AOSP. - arch/arm/mm/mmu.c: 97b095e5: "ARM: mm: Split memory banks that span multiple sections when sparsemem is enabled" doesn't seem required anymore, and isn't added to AOSP => Align with AOSP. - arch/arm64/Kconfig: 27aa5398: "arm64: a backwards compatible config option", and 8354fc2d: "arm64: cpuinfo: ARMv7 compatable cpuinfo option" are reverted in AOSP trees => Remove and align with AOSP - arch/arm64/include/asm/debug-monitors.h: Minor differences with AOSP merge v/s ours => Align with AOSP - arch/mips/include/uapi/asm/unistd.h: 598966e MIPS: add seccomp syscall has merge differences between AOSP and ours => Align with AOSP. - drivers/mmc/core/core.c: drivers/mmc/core/host.c: include/linux/mmc/host.h: 2f76feb mmc: core: host: only use wakelock for detect work by Colin Cross: was present in 3.10,and so in fwd-port; Missing from 3.14/3.18; it als introduced a memory leak w/ TI => Align with AOSP by reverting the above commit - drivers/usb/gadget/f_accessory.c: feee075e: "usb: gadget: f_accessory: fix missing NULL pointer check" by Amit Pundir that was being carried in linaro-fixes isn't required anymore due to the AOSP merged fix. => Align with AOSP. - drivers/usb/gadget/u_ether.c: minor code rearrangement during our merge => ALIGN with AOSP. - include/net/bluetooth/hci.h: include/net/bluetooth/hci_core.h: net/bluetooth/hci_conn.c: net/bluetooth/hci_event.c: net/bluetooth/rfcomm/core.c: => BT Patches not in 3.14/3.18; ALIGN with AOSP. - include/net/netfilter/ipv4/nf_reject.h: include/net/netfilter/ipv6/nf_reject.h: net/ipv4/netfilter/Kconfig: net/ipv6/netfilter/Kconfig: 8d83a89758: netfilter: have ip*t REJECT set the sock err when an icmp is to be sent: NOT in 3.14/3.18 => ALIGN with AOSP - include/uapi/asm-generic/unistd.h: 08f6b117d: seccomp: add "seccomp" syscall has merge differences between our merge and AOSP's => ALIGN with AOSP - kernel/irq/pm.c: c2d35c6 irq: pm: Remove unused variable by Dmitry Shmidt => ALIGN with AOSP. - kernel/power/wakelock.c: 11388c8 PM / Sleep: Require CAP_BLOCK_SUSPEND to use wake_lock/wake_unlock by Rafael J. Wysocki has merge differences between our merge and AOSP's => ALIGN with AOSP - kernel/sys.c: 77d83f8d: prctl: adds PR_SET_TIMERSLACK_PID for setting timer slack of an arbitrary thread has merge differences between our merge and AOSP's => ALIGN with AOSP - net/wireless/Kconfig: net/wireless/sme.c: CONFIG_CFG80211 related patches are not in 3.14/3.18 AOSP => ALIGN with AOSP Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/irq/pm.c1
-rw-r--r--kernel/power/wakelock.c7
-rw-r--r--kernel/sys.c20
3 files changed, 7 insertions, 21 deletions
diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c
index f94d703c9f55..da5f2ffa7106 100644
--- a/kernel/irq/pm.c
+++ b/kernel/irq/pm.c
@@ -100,7 +100,6 @@ EXPORT_SYMBOL_GPL(resume_device_irqs);
int check_wakeup_irqs(void)
{
struct irq_desc *desc;
- char __maybe_unused suspend_abort[MAX_SUSPEND_ABORT_LEN];
int irq;
for_each_irq_desc(irq, desc) {
diff --git a/kernel/power/wakelock.c b/kernel/power/wakelock.c
index c8fba3380076..8f50de394d22 100644
--- a/kernel/power/wakelock.c
+++ b/kernel/power/wakelock.c
@@ -9,6 +9,7 @@
* manipulate wakelocks on Android.
*/
+#include <linux/capability.h>
#include <linux/ctype.h>
#include <linux/device.h>
#include <linux/err.h>
@@ -188,6 +189,9 @@ int pm_wake_lock(const char *buf)
size_t len;
int ret = 0;
+ if (!capable(CAP_BLOCK_SUSPEND))
+ return -EPERM;
+
while (*str && !isspace(*str))
str++;
@@ -231,6 +235,9 @@ int pm_wake_unlock(const char *buf)
size_t len;
int ret = 0;
+ if (!capable(CAP_BLOCK_SUSPEND))
+ return -EPERM;
+
len = strlen(buf);
if (!len)
return -EINVAL;
diff --git a/kernel/sys.c b/kernel/sys.c
index 8ba889e31bea..4bf3cb0f337c 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -2111,26 +2111,6 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
else
return -EINVAL;
break;
- case PR_SET_TIMERSLACK_PID:
- if (current->pid != (pid_t)arg3 &&
- !capable(CAP_SYS_NICE))
- return -EPERM;
- rcu_read_lock();
- tsk = find_task_by_pid_ns((pid_t)arg3, &init_pid_ns);
- if (tsk == NULL) {
- rcu_read_unlock();
- return -EINVAL;
- }
- get_task_struct(tsk);
- rcu_read_unlock();
- if (arg2 <= 0)
- tsk->timer_slack_ns =
- tsk->default_timer_slack_ns;
- else
- tsk->timer_slack_ns = arg2;
- put_task_struct(tsk);
- error = 0;
- break;
default:
return -EINVAL;
}