summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorBlagovest Kolenichev <bkolenichev@codeaurora.org>2017-10-20 05:23:23 -0700
committerBlagovest Kolenichev <bkolenichev@codeaurora.org>2017-10-20 06:07:34 -0700
commitf9719b203c2d9b1a37de146fa6f19942f98fe69d (patch)
tree771a48d8ad13532879cf52358b5509f7512ac94b /kernel
parentb2465235ad43e26e351e3b437a7f90f927cf11a4 (diff)
parentd6fbbe5e665eb04c698d5801ff05c4b6ca934d6b (diff)
Merge android-4.4@d6fbbe5 (v4.4.93) into msm-4.4
* refs/heads/tmp-d6fbbe5 Linux 4.4.93 x86/alternatives: Fix alt_max_short macro to really be a max() USB: serial: console: fix use-after-free after failed setup USB: serial: qcserial: add Dell DW5818, DW5819 USB: serial: option: add support for TP-Link LTE module USB: serial: cp210x: add support for ELV TFD500 USB: serial: ftdi_sio: add id for Cypress WICED dev board fix unbalanced page refcounting in bio_map_user_iov direct-io: Prevent NULL pointer access in submit_page_section usb: gadget: composite: Fix use-after-free in usb_composite_overwrite_options ALSA: line6: Fix leftover URB at error-path during probe ALSA: caiaq: Fix stray URB at probe error path ALSA: seq: Fix copy_from_user() call inside lock ALSA: seq: Fix use-after-free at creating a port ALSA: usb-audio: Kill stray URB at exiting iommu/amd: Finish TLB flush in amd_iommu_unmap() usb: renesas_usbhs: Fix DMAC sequence for receiving zero-length packet KVM: nVMX: fix guest CR4 loading when emulating L2 to L1 exit crypto: shash - Fix zero-length shash ahash digest crash HID: usbhid: fix out-of-bounds bug dmaengine: edma: Align the memcpy acnt array size with the transfer MIPS: math-emu: Remove pr_err() calls from fpu_emu() USB: dummy-hcd: Fix deadlock caused by disconnect detection rcu: Allow for page faults in NMI handlers iwlwifi: mvm: use IWL_HCMD_NOCOPY for MCAST_FILTER_CMD nl80211: Define policy for packet pattern attributes CIFS: Reconnect expired SMB sessions ext4: in ext4_seek_{hole,data}, return -ENXIO for negative offsets brcmfmac: add length check in brcmf_cfg80211_escan_handler() ANDROID: HACK: arm64: use -mno-implicit-float instead of -mgeneral-regs-only sched: Update task->on_rq when tasks are moving between runqueues FROMLIST: f2fs: expose some sectors to user in inline data or dentry case crypto: Work around deallocated stack frame reference gcc bug on sparc. UPSTREAM: f2fs: fix potential panic during fstrim ANDROID: fscrypt: remove unnecessary fscrypto.h ANDROID: binder: fix node sched policy calculation ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple CHROMIUM: arm64: Disable asm-operand-width warning for clang CHROMIUM: kbuild: clang: Disable the 'duplicate-decl-specifier' warning UPSTREAM: x86/build: Use cc-option to validate stack alignment parameter UPSTREAM: x86/build: Fix stack alignment for CLang UPSTREAM: efi/libstub/arm64: Set -fpie when building the EFI stub BACKPORT: efi/libstub/arm64: Force 'hidden' visibility for section markers UPSTREAM: compiler, clang: always inline when CONFIG_OPTIMIZE_INLINING is disabled UPSTREAM: x86/boot: #undef memcpy() et al in string.c UPSTREAM: crypto: arm64/sha - avoid non-standard inline asm tricks UPSTREAM: kbuild: clang: Disable 'address-of-packed-member' warning UPSTREAM: x86/build: Specify stack alignment for clang UPSTREAM: x86/build: Use __cc-option for boot code compiler options BACKPORT: kbuild: Add __cc-option macro UPSTREAM: x86/hweight: Don't clobber %rdi BACKPORT: x86/hweight: Get rid of the special calling convention BACKPORT: x86/mm/kaslr: Use the _ASM_MUL macro for multiplication to work around Clang incompatibility UPSTREAM: crypto, x86: aesni - fix token pasting for clang UPSTREAM: x86/kbuild: Use cc-option to enable -falign-{jumps/loops} UPSTREAM: compiler, clang: properly override 'inline' for clang UPSTREAM: compiler, clang: suppress warning for unused static inline functions UPSTREAM: Kbuild: provide a __UNIQUE_ID for clang UPSTREAM: modules: mark __inittest/__exittest as __maybe_unused BACKPORT: kbuild: Add support to generate LLVM assembly files UPSTREAM: kbuild: use -Oz instead of -Os when using clang BACKPORT: kbuild, LLVMLinux: Add -Werror to cc-option to support clang UPSTREAM: kbuild: drop -Wno-unknown-warning-option from clang options UPSTREAM: kbuild: fix asm-offset generation to work with clang UPSTREAM: kbuild: consolidate redundant sed script ASM offset generation UPSTREAM: kbuild: Consolidate header generation from ASM offset information UPSTREAM: kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS UPSTREAM: kbuild: Add better clang cross build support Conflicts: arch/x86/lib/Makefile net/wireless/nl80211.c Change-Id: I76032e8d1206903bc948b9ed918e7ddee7e746c7 Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/rcu/tree.c12
-rw-r--r--kernel/sched/core.c2
-rw-r--r--kernel/sched/deadline.c4
-rw-r--r--kernel/sched/rt.c4
4 files changed, 22 insertions, 0 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 1ba183e7987c..3decfbc88308 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -757,6 +757,12 @@ void rcu_irq_exit(void)
local_irq_save(flags);
rdtp = this_cpu_ptr(&rcu_dynticks);
+
+ /* Page faults can happen in NMI handlers, so check... */
+ if (READ_ONCE(rdtp->dynticks_nmi_nesting))
+ return;
+
+ RCU_LOCKDEP_WARN(!irqs_disabled(), "rcu_irq_exit() invoked with irqs enabled!!!");
oldval = rdtp->dynticks_nesting;
rdtp->dynticks_nesting--;
WARN_ON_ONCE(IS_ENABLED(CONFIG_RCU_EQS_DEBUG) &&
@@ -885,6 +891,12 @@ void rcu_irq_enter(void)
local_irq_save(flags);
rdtp = this_cpu_ptr(&rcu_dynticks);
+
+ /* Page faults can happen in NMI handlers, so check... */
+ if (READ_ONCE(rdtp->dynticks_nmi_nesting))
+ return;
+
+ RCU_LOCKDEP_WARN(!irqs_disabled(), "rcu_irq_enter() invoked with irqs enabled!!!");
oldval = rdtp->dynticks_nesting;
rdtp->dynticks_nesting++;
WARN_ON_ONCE(IS_ENABLED(CONFIG_RCU_EQS_DEBUG) &&
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 3410706ea7d5..4581a6c9b16f 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1372,7 +1372,9 @@ static void __migrate_swap_task(struct task_struct *p, int cpu)
p->on_rq = TASK_ON_RQ_MIGRATING;
deactivate_task(src_rq, p, 0);
+ p->on_rq = TASK_ON_RQ_MIGRATING;
set_task_cpu(p, cpu);
+ p->on_rq = TASK_ON_RQ_QUEUED;
activate_task(dst_rq, p, 0);
p->on_rq = TASK_ON_RQ_QUEUED;
check_preempt_curr(dst_rq, p, 0);
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 905d8cb5a6eb..167a1038cff0 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -1625,7 +1625,9 @@ retry:
next_task->on_rq = TASK_ON_RQ_MIGRATING;
deactivate_task(rq, next_task, 0);
clear_average_bw(&next_task->dl, &rq->dl);
+ next_task->on_rq = TASK_ON_RQ_MIGRATING;
set_task_cpu(next_task, later_rq->cpu);
+ next_task->on_rq = TASK_ON_RQ_QUEUED;
add_average_bw(&next_task->dl, &later_rq->dl);
activate_task(later_rq, next_task, 0);
next_task->on_rq = TASK_ON_RQ_QUEUED;
@@ -1717,7 +1719,9 @@ static void pull_dl_task(struct rq *this_rq)
p->on_rq = TASK_ON_RQ_MIGRATING;
deactivate_task(src_rq, p, 0);
clear_average_bw(&p->dl, &src_rq->dl);
+ p->on_rq = TASK_ON_RQ_MIGRATING;
set_task_cpu(p, this_cpu);
+ p->on_rq = TASK_ON_RQ_QUEUED;
add_average_bw(&p->dl, &this_rq->dl);
activate_task(this_rq, p, 0);
p->on_rq = TASK_ON_RQ_QUEUED;
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index ee095f4e7230..23b68b051cee 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -2117,7 +2117,9 @@ retry:
next_task->on_rq = TASK_ON_RQ_MIGRATING;
deactivate_task(rq, next_task, 0);
+ next_task->on_rq = TASK_ON_RQ_MIGRATING;
set_task_cpu(next_task, lowest_rq->cpu);
+ next_task->on_rq = TASK_ON_RQ_QUEUED;
activate_task(lowest_rq, next_task, 0);
next_task->on_rq = TASK_ON_RQ_QUEUED;
ret = 1;
@@ -2373,7 +2375,9 @@ static void pull_rt_task(struct rq *this_rq)
p->on_rq = TASK_ON_RQ_MIGRATING;
deactivate_task(src_rq, p, 0);
+ p->on_rq = TASK_ON_RQ_MIGRATING;
set_task_cpu(p, this_cpu);
+ p->on_rq = TASK_ON_RQ_QUEUED;
activate_task(this_rq, p, 0);
p->on_rq = TASK_ON_RQ_QUEUED;
/*