aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLCPD Auto Merger2017-08-25 12:32:56 -0500
committerLCPD Auto Merger2017-08-25 12:32:56 -0500
commitb7cb1e7be3e09b988a9813db8839f467f4762001 (patch)
tree9747403d374bf8907a09949fb8b58e1d6e1e3351 /kernel
parentd216ca1dcf7c7ed5c44d1aaef16dadae04808d69 (diff)
parent982ce2aa79fbe7c961ee948857d5b5b2a0b2ddd9 (diff)
downloadkernel-omap-b7cb1e7be3e09b988a9813db8839f467f4762001.tar.gz
kernel-omap-b7cb1e7be3e09b988a9813db8839f467f4762001.tar.xz
kernel-omap-b7cb1e7be3e09b988a9813db8839f467f4762001.zip
Merge tag 'v4.4.84' of http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into ti-linux-4.4.y
This is the 4.4.84 stable release * tag 'v4.4.84' of http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable: (21 commits) Linux 4.4.84 usb: qmi_wwan: add D-Link DWM-222 device ID usb: optimize acpi companion search for usb port devices perf/x86: Fix LBR related crashes on Intel Atom pids: make task_tgid_nr_ns() safe Sanitize 'move_pages()' permission checks irqchip/atmel-aic: Fix unbalanced refcount in aic_common_rtc_irq_fixup() irqchip/atmel-aic: Fix unbalanced of_node_put() in aic_common_irq_fixup() x86/asm/64: Clear AC on NMI entries xen: fix bio vec merging mm: revert x86_64 and arm64 ELF_ET_DYN_BASE base changes mm/mempolicy: fix use after free when calling get_mempolicy ALSA: usb-audio: Add mute TLV for playback volumes on C-Media devices ALSA: usb-audio: Apply sample rate quirk to Sennheiser headset ALSA: seq: 2nd attempt at fixing race creating a queue Input: elan_i2c - Add antoher Lenovo ACPI ID for upcoming Lenovo NB Input: elan_i2c - add ELAN0608 to the ACPI table crypto: x86/sha1 - Fix reads beyond the number of blocks passed parisc: pci memory bar assignment fails with 64bit kernels on dino/cujo audit: Fix use after free in audit_remove_watch_rule() ... Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/audit_watch.c12
-rw-r--r--kernel/pid.c11
2 files changed, 11 insertions, 12 deletions
diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c
index 939945a5649c..a162661c9d60 100644
--- a/kernel/audit_watch.c
+++ b/kernel/audit_watch.c
@@ -457,13 +457,15 @@ void audit_remove_watch_rule(struct audit_krule *krule)
457 list_del(&krule->rlist); 457 list_del(&krule->rlist);
458 458
459 if (list_empty(&watch->rules)) { 459 if (list_empty(&watch->rules)) {
460 /*
461 * audit_remove_watch() drops our reference to 'parent' which
462 * can get freed. Grab our own reference to be safe.
463 */
464 audit_get_parent(parent);
460 audit_remove_watch(watch); 465 audit_remove_watch(watch);
461 466 if (list_empty(&parent->watches))
462 if (list_empty(&parent->watches)) {
463 audit_get_parent(parent);
464 fsnotify_destroy_mark(&parent->mark, audit_watch_group); 467 fsnotify_destroy_mark(&parent->mark, audit_watch_group);
465 audit_put_parent(parent); 468 audit_put_parent(parent);
466 }
467 } 469 }
468} 470}
469 471
diff --git a/kernel/pid.c b/kernel/pid.c
index 78b3d9f80d44..b17263be9082 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -526,8 +526,11 @@ pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type,
526 if (!ns) 526 if (!ns)
527 ns = task_active_pid_ns(current); 527 ns = task_active_pid_ns(current);
528 if (likely(pid_alive(task))) { 528 if (likely(pid_alive(task))) {
529 if (type != PIDTYPE_PID) 529 if (type != PIDTYPE_PID) {
530 if (type == __PIDTYPE_TGID)
531 type = PIDTYPE_PID;
530 task = task->group_leader; 532 task = task->group_leader;
533 }
531 nr = pid_nr_ns(rcu_dereference(task->pids[type].pid), ns); 534 nr = pid_nr_ns(rcu_dereference(task->pids[type].pid), ns);
532 } 535 }
533 rcu_read_unlock(); 536 rcu_read_unlock();
@@ -536,12 +539,6 @@ pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type,
536} 539}
537EXPORT_SYMBOL(__task_pid_nr_ns); 540EXPORT_SYMBOL(__task_pid_nr_ns);
538 541
539pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns)
540{
541 return pid_nr_ns(task_tgid(tsk), ns);
542}
543EXPORT_SYMBOL(task_tgid_nr_ns);
544
545struct pid_namespace *task_active_pid_ns(struct task_struct *tsk) 542struct pid_namespace *task_active_pid_ns(struct task_struct *tsk)
546{ 543{
547 return ns_of_pid(task_pid(tsk)); 544 return ns_of_pid(task_pid(tsk));