History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Trivial conflict in CAN, keep the net-next + the byteswap wrapper. Conflicts: drivers/net/can/usb/gs_usb.c

Jakub Kicinski committed 5 years ago

Commit 5c39f262 parents 6375da9 c84e1ef387 files · +6414 −2991Browse files

Showing the changes to kernel (8 of 387 files). Show all

Unified · Split

8 files
  1. kernel/locking/lockdep.c +4 −2
  2. kernel/printk/printk.c +2 −2
  3. kernel/printk/printk_ringbuffer.c +0 −2
  4. kernel/ptrace.c +5 −11
  5. kernel/sched/core.c +16 −10
  6. kernel/sched/deadline.c +53 −44
  7. kernel/sched/fair.c +2 −1
  8. kernel/seccomp.c +2 −3
kernel/locking/lockdep.c+4−2
@@ -108,19 +108,21 @@ static inline void lockdep_lock(void) · 107 unmodified lines
108{108{
109 DEBUG_LOCKS_WARN_ON(!irqs_disabled());109 DEBUG_LOCKS_WARN_ON(!irqs_disabled());
110 110
111 __this_cpu_inc(lockdep_recursion);
111 arch_spin_lock(&__lock);112 arch_spin_lock(&__lock);
112 __owner = current;113 __owner = current;
113 __this_cpu_inc(lockdep_recursion);
114}114}
115 115
116static inline void lockdep_unlock(void)116static inline void lockdep_unlock(void)
117{117{
118 DEBUG_LOCKS_WARN_ON(!irqs_disabled());
119
118 if (debug_locks && DEBUG_LOCKS_WARN_ON(__owner != current))120 if (debug_locks && DEBUG_LOCKS_WARN_ON(__owner != current))
119 return;121 return;
120 122
121 __this_cpu_dec(lockdep_recursion);
122 __owner = NULL;123 __owner = NULL;
123 arch_spin_unlock(&__lock);124 arch_spin_unlock(&__lock);
125 __this_cpu_dec(lockdep_recursion);
124}126}
125 127
126static inline bool lockdep_assert_locked(void)128static inline bool lockdep_assert_locked(void)
kernel/printk/printk.c+2−2
@@ -528,8 +528,8 @@ static int log_store(u32 caller_id, int facility, int level, · 527 unmodified lines
528 if (dev_info)528 if (dev_info)
529 memcpy(&r.info->dev_info, dev_info, sizeof(r.info->dev_info));529 memcpy(&r.info->dev_info, dev_info, sizeof(r.info->dev_info));
530 530
531 /* insert message */531 /* A message without a trailing newline can be continued. */
532 if ((flags & LOG_CONT) || !(flags & LOG_NEWLINE))532 if (!(flags & LOG_NEWLINE))
533 prb_commit(&e);533 prb_commit(&e);
534 else534 else
535 prb_final_commit(&e);535 prb_final_commit(&e);
kernel/printk/printk_ringbuffer.c+0−2
@@ -882,8 +882,6 @@ static bool desc_reserve(struct printk_ringbuffer *rb, unsigned long *id_out) · 881 unmodified lines
882 head_id = atomic_long_read(&desc_ring->head_id); /* LMM(desc_reserve:A) */882 head_id = atomic_long_read(&desc_ring->head_id); /* LMM(desc_reserve:A) */
883 883
884 do {884 do {
885 desc = to_desc(desc_ring, head_id);
886
887 id = DESC_ID(head_id + 1);885 id = DESC_ID(head_id + 1);
888 id_prev_wrap = DESC_ID_PREV_WRAP(desc_ring, id);886 id_prev_wrap = DESC_ID_PREV_WRAP(desc_ring, id);
889 887
kernel/ptrace.c+5−11
@@ -264,17 +264,11 @@ static int ptrace_check_attach(struct task_struct *child, bool ignore_state) · 263 unmodified lines
264 return ret;264 return ret;
265}265}
266 266
267static bool ptrace_has_cap(const struct cred *cred, struct user_namespace *ns,267static bool ptrace_has_cap(struct user_namespace *ns, unsigned int mode)
268 unsigned int mode)
269{268{
270 int ret;
271
272 if (mode & PTRACE_MODE_NOAUDIT)269 if (mode & PTRACE_MODE_NOAUDIT)
273 ret = security_capable(cred, ns, CAP_SYS_PTRACE, CAP_OPT_NOAUDIT);270 return ns_capable_noaudit(ns, CAP_SYS_PTRACE);
274 else271 return ns_capable(ns, CAP_SYS_PTRACE);
275 ret = security_capable(cred, ns, CAP_SYS_PTRACE, CAP_OPT_NONE);
276
277 return ret == 0;
278}272}
279 273
280/* Returns 0 on success, -errno on denial. */274/* Returns 0 on success, -errno on denial. */
@@ -326,7 +320,7 @@ static int __ptrace_may_access(struct task_struct *task, unsigned int mode) · 45 unmodified lines
326 gid_eq(caller_gid, tcred->sgid) &&320 gid_eq(caller_gid, tcred->sgid) &&
327 gid_eq(caller_gid, tcred->gid))321 gid_eq(caller_gid, tcred->gid))
328 goto ok;322 goto ok;
329 if (ptrace_has_cap(cred, tcred->user_ns, mode))323 if (ptrace_has_cap(tcred->user_ns, mode))
330 goto ok;324 goto ok;
331 rcu_read_unlock();325 rcu_read_unlock();
332 return -EPERM;326 return -EPERM;
@@ -345,7 +339,7 @@ ok: · 12 unmodified lines
345 mm = task->mm;339 mm = task->mm;
346 if (mm &&340 if (mm &&
347 ((get_dumpable(mm) != SUID_DUMP_USER) &&341 ((get_dumpable(mm) != SUID_DUMP_USER) &&
348 !ptrace_has_cap(cred, mm->user_ns, mode)))342 !ptrace_has_cap(mm->user_ns, mode)))
349 return -EPERM;343 return -EPERM;
350 344
351 return security_ptrace_access_check(task, mode);345 return security_ptrace_access_check(task, mode);
kernel/sched/core.c+16−10
@@ -2501,7 +2501,12 @@ ttwu_do_activate(struct rq *rq, struct task_struct *p, int wake_flags, · 2500 unmodified lines
2501#ifdef CONFIG_SMP2501#ifdef CONFIG_SMP
2502 if (wake_flags & WF_MIGRATED)2502 if (wake_flags & WF_MIGRATED)
2503 en_flags |= ENQUEUE_MIGRATED;2503 en_flags |= ENQUEUE_MIGRATED;
2504 else
2504#endif2505#endif
2506 if (p->in_iowait) {
2507 delayacct_blkio_end(p);
2508 atomic_dec(&task_rq(p)->nr_iowait);
2509 }
2505 2510
2506 activate_task(rq, p, en_flags);2511 activate_task(rq, p, en_flags);
2507 ttwu_do_wakeup(rq, p, wake_flags, rf);2512 ttwu_do_wakeup(rq, p, wake_flags, rf);
@@ -2888,11 +2893,6 @@ try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags) · 380 unmodified lines
2888 if (READ_ONCE(p->on_rq) && ttwu_runnable(p, wake_flags))2893 if (READ_ONCE(p->on_rq) && ttwu_runnable(p, wake_flags))
2889 goto unlock;2894 goto unlock;
2890 2895
2891 if (p->in_iowait) {
2892 delayacct_blkio_end(p);
2893 atomic_dec(&task_rq(p)->nr_iowait);
2894 }
2895
2896#ifdef CONFIG_SMP2896#ifdef CONFIG_SMP
2897 /*2897 /*
2898 * Ensure we load p->on_cpu _after_ p->on_rq, otherwise it would be2898 * Ensure we load p->on_cpu _after_ p->on_rq, otherwise it would be
@@ -2963,6 +2963,11 @@ try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags) · 64 unmodified lines
2963 2963
2964 cpu = select_task_rq(p, p->wake_cpu, SD_BALANCE_WAKE, wake_flags);2964 cpu = select_task_rq(p, p->wake_cpu, SD_BALANCE_WAKE, wake_flags);
2965 if (task_cpu(p) != cpu) {2965 if (task_cpu(p) != cpu) {
2966 if (p->in_iowait) {
2967 delayacct_blkio_end(p);
2968 atomic_dec(&task_rq(p)->nr_iowait);
2969 }
2970
2966 wake_flags |= WF_MIGRATED;2971 wake_flags |= WF_MIGRATED;
2967 psi_ttwu_dequeue(p);2972 psi_ttwu_dequeue(p);
2968 set_task_cpu(p, cpu);2973 set_task_cpu(p, cpu);
@@ -4907,20 +4912,21 @@ void rt_mutex_setprio(struct task_struct *p, struct task_struct *pi_task) · 1938 unmodified lines
4907 if (!dl_prio(p->normal_prio) ||4912 if (!dl_prio(p->normal_prio) ||
4908 (pi_task && dl_prio(pi_task->prio) &&4913 (pi_task && dl_prio(pi_task->prio) &&
4909 dl_entity_preempt(&pi_task->dl, &p->dl))) {4914 dl_entity_preempt(&pi_task->dl, &p->dl))) {
4910 p->dl.dl_boosted = 1;4915 p->dl.pi_se = pi_task->dl.pi_se;
4911 queue_flag |= ENQUEUE_REPLENISH;4916 queue_flag |= ENQUEUE_REPLENISH;
4912 } else4917 } else {
4913 p->dl.dl_boosted = 0;4918 p->dl.pi_se = &p->dl;
4919 }
4914 p->sched_class = &dl_sched_class;4920 p->sched_class = &dl_sched_class;
4915 } else if (rt_prio(prio)) {4921 } else if (rt_prio(prio)) {
4916 if (dl_prio(oldprio))4922 if (dl_prio(oldprio))
4917 p->dl.dl_boosted = 0;4923 p->dl.pi_se = &p->dl;
4918 if (oldprio < prio)4924 if (oldprio < prio)
4919 queue_flag |= ENQUEUE_HEAD;4925 queue_flag |= ENQUEUE_HEAD;
4920 p->sched_class = &rt_sched_class;4926 p->sched_class = &rt_sched_class;
4921 } else {4927 } else {
4922 if (dl_prio(oldprio))4928 if (dl_prio(oldprio))
4923 p->dl.dl_boosted = 0;4929 p->dl.pi_se = &p->dl;
4924 if (rt_prio(oldprio))4930 if (rt_prio(oldprio))
4925 p->rt.timeout = 0;4931 p->rt.timeout = 0;
4926 p->sched_class = &fair_sched_class;4932 p->sched_class = &fair_sched_class;
kernel/sched/deadline.c+53−44
@@ -43,6 +43,28 @@ static inline int on_dl_rq(struct sched_dl_entity *dl_se) · 42 unmodified lines
43 return !RB_EMPTY_NODE(&dl_se->rb_node);43 return !RB_EMPTY_NODE(&dl_se->rb_node);
44}44}
45 45
46#ifdef CONFIG_RT_MUTEXES
47static inline struct sched_dl_entity *pi_of(struct sched_dl_entity *dl_se)
48{
49 return dl_se->pi_se;
50}
51
52static inline bool is_dl_boosted(struct sched_dl_entity *dl_se)
53{
54 return pi_of(dl_se) != dl_se;
55}
56#else
57static inline struct sched_dl_entity *pi_of(struct sched_dl_entity *dl_se)
58{
59 return dl_se;
60}
61
62static inline bool is_dl_boosted(struct sched_dl_entity *dl_se)
63{
64 return false;
65}
66#endif
67
46#ifdef CONFIG_SMP68#ifdef CONFIG_SMP
47static inline struct dl_bw *dl_bw_of(int i)69static inline struct dl_bw *dl_bw_of(int i)
48{70{
@@ -698,7 +720,7 @@ static inline void setup_new_dl_entity(struct sched_dl_entity *dl_se) · 649 unmodified lines
698 struct dl_rq *dl_rq = dl_rq_of_se(dl_se);720 struct dl_rq *dl_rq = dl_rq_of_se(dl_se);
699 struct rq *rq = rq_of_dl_rq(dl_rq);721 struct rq *rq = rq_of_dl_rq(dl_rq);
700 722
701 WARN_ON(dl_se->dl_boosted);723 WARN_ON(is_dl_boosted(dl_se));
702 WARN_ON(dl_time_before(rq_clock(rq), dl_se->deadline));724 WARN_ON(dl_time_before(rq_clock(rq), dl_se->deadline));
703 725
704 /*726 /*
@@ -736,21 +758,20 @@ static inline void setup_new_dl_entity(struct sched_dl_entity *dl_se) · 31 unmodified lines
736 * could happen are, typically, a entity voluntarily trying to overcome its758 * could happen are, typically, a entity voluntarily trying to overcome its
737 * runtime, or it just underestimated it during sched_setattr().759 * runtime, or it just underestimated it during sched_setattr().
738 */760 */
739static void replenish_dl_entity(struct sched_dl_entity *dl_se,761static void replenish_dl_entity(struct sched_dl_entity *dl_se)
740 struct sched_dl_entity *pi_se)
741{762{
742 struct dl_rq *dl_rq = dl_rq_of_se(dl_se);763 struct dl_rq *dl_rq = dl_rq_of_se(dl_se);
743 struct rq *rq = rq_of_dl_rq(dl_rq);764 struct rq *rq = rq_of_dl_rq(dl_rq);
744 765
745 BUG_ON(pi_se->dl_runtime <= 0);766 BUG_ON(pi_of(dl_se)->dl_runtime <= 0);
746 767
747 /*768 /*
748 * This could be the case for a !-dl task that is boosted.769 * This could be the case for a !-dl task that is boosted.
749 * Just go with full inherited parameters.770 * Just go with full inherited parameters.
750 */771 */
751 if (dl_se->dl_deadline == 0) {772 if (dl_se->dl_deadline == 0) {
752 dl_se->deadline = rq_clock(rq) + pi_se->dl_deadline;773 dl_se->deadline = rq_clock(rq) + pi_of(dl_se)->dl_deadline;
753 dl_se->runtime = pi_se->dl_runtime;774 dl_se->runtime = pi_of(dl_se)->dl_runtime;
754 }775 }
755 776
756 if (dl_se->dl_yielded && dl_se->runtime > 0)777 if (dl_se->dl_yielded && dl_se->runtime > 0)
@@ -763,8 +784,8 @@ static void replenish_dl_entity(struct sched_dl_entity *dl_se, · 6 unmodified lines
763 * arbitrary large.784 * arbitrary large.
764 */785 */
765 while (dl_se->runtime <= 0) {786 while (dl_se->runtime <= 0) {
766 dl_se->deadline += pi_se->dl_period;787 dl_se->deadline += pi_of(dl_se)->dl_period;
767 dl_se->runtime += pi_se->dl_runtime;788 dl_se->runtime += pi_of(dl_se)->dl_runtime;
768 }789 }
769 790
770 /*791 /*
@@ -778,8 +799,8 @@ static void replenish_dl_entity(struct sched_dl_entity *dl_se, · 7 unmodified lines
778 */799 */
779 if (dl_time_before(dl_se->deadline, rq_clock(rq))) {800 if (dl_time_before(dl_se->deadline, rq_clock(rq))) {
780 printk_deferred_once("sched: DL replenish lagged too much\n");801 printk_deferred_once("sched: DL replenish lagged too much\n");
781 dl_se->deadline = rq_clock(rq) + pi_se->dl_deadline;802 dl_se->deadline = rq_clock(rq) + pi_of(dl_se)->dl_deadline;
782 dl_se->runtime = pi_se->dl_runtime;803 dl_se->runtime = pi_of(dl_se)->dl_runtime;
783 }804 }
784 805
785 if (dl_se->dl_yielded)806 if (dl_se->dl_yielded)
@@ -812,8 +833,7 @@ static void replenish_dl_entity(struct sched_dl_entity *dl_se, · 26 unmodified lines
812 * task with deadline equal to period this is the same of using833 * task with deadline equal to period this is the same of using
813 * dl_period instead of dl_deadline in the equation above.834 * dl_period instead of dl_deadline in the equation above.
814 */835 */
815static bool dl_entity_overflow(struct sched_dl_entity *dl_se,836static bool dl_entity_overflow(struct sched_dl_entity *dl_se, u64 t)
816 struct sched_dl_entity *pi_se, u64 t)
817{837{
818 u64 left, right;838 u64 left, right;
819 839
@@ -835,9 +855,9 @@ static bool dl_entity_overflow(struct sched_dl_entity *dl_se, · 15 unmodified lines
835 * of anything below microseconds resolution is actually fiction855 * of anything below microseconds resolution is actually fiction
836 * (but still we want to give the user that illusion >;).856 * (but still we want to give the user that illusion >;).
837 */857 */
838 left = (pi_se->dl_deadline >> DL_SCALE) * (dl_se->runtime >> DL_SCALE);858 left = (pi_of(dl_se)->dl_deadline >> DL_SCALE) * (dl_se->runtime >> DL_SCALE);
839 right = ((dl_se->deadline - t) >> DL_SCALE) *859 right = ((dl_se->deadline - t) >> DL_SCALE) *
840 (pi_se->dl_runtime >> DL_SCALE);860 (pi_of(dl_se)->dl_runtime >> DL_SCALE);
841 861
842 return dl_time_before(right, left);862 return dl_time_before(right, left);
843}863}
@@ -922,24 +942,23 @@ static inline bool dl_is_implicit(struct sched_dl_entity *dl_se) · 78 unmodified lines
922 * Please refer to the comments update_dl_revised_wakeup() function to find942 * Please refer to the comments update_dl_revised_wakeup() function to find
923 * more about the Revised CBS rule.943 * more about the Revised CBS rule.
924 */944 */
925static void update_dl_entity(struct sched_dl_entity *dl_se,945static void update_dl_entity(struct sched_dl_entity *dl_se)
926 struct sched_dl_entity *pi_se)
927{946{
928 struct dl_rq *dl_rq = dl_rq_of_se(dl_se);947 struct dl_rq *dl_rq = dl_rq_of_se(dl_se);
929 struct rq *rq = rq_of_dl_rq(dl_rq);948 struct rq *rq = rq_of_dl_rq(dl_rq);
930 949
931 if (dl_time_before(dl_se->deadline, rq_clock(rq)) ||950 if (dl_time_before(dl_se->deadline, rq_clock(rq)) ||
932 dl_entity_overflow(dl_se, pi_se, rq_clock(rq))) {951 dl_entity_overflow(dl_se, rq_clock(rq))) {
933 952
934 if (unlikely(!dl_is_implicit(dl_se) &&953 if (unlikely(!dl_is_implicit(dl_se) &&
935 !dl_time_before(dl_se->deadline, rq_clock(rq)) &&954 !dl_time_before(dl_se->deadline, rq_clock(rq)) &&
936 !dl_se->dl_boosted)){955 !is_dl_boosted(dl_se))) {
937 update_dl_revised_wakeup(dl_se, rq);956 update_dl_revised_wakeup(dl_se, rq);
938 return;957 return;
939 }958 }
940 959
941 dl_se->deadline = rq_clock(rq) + pi_se->dl_deadline;960 dl_se->deadline = rq_clock(rq) + pi_of(dl_se)->dl_deadline;
942 dl_se->runtime = pi_se->dl_runtime;961 dl_se->runtime = pi_of(dl_se)->dl_runtime;
943 }962 }
944}963}
945 964
@@ -1038,7 +1057,7 @@ static enum hrtimer_restart dl_task_timer(struct hrtimer *timer) · 92 unmodified lines
1038 * The task might have been boosted by someone else and might be in the1057 * The task might have been boosted by someone else and might be in the
1039 * boosting/deboosting path, its not throttled.1058 * boosting/deboosting path, its not throttled.
1040 */1059 */
1041 if (dl_se->dl_boosted)1060 if (is_dl_boosted(dl_se))
1042 goto unlock;1061 goto unlock;
1043 1062
1044 /*1063 /*
@@ -1066,7 +1085,7 @@ static enum hrtimer_restart dl_task_timer(struct hrtimer *timer) · 21 unmodified lines
1066 * but do not enqueue -- wait for our wakeup to do that.1085 * but do not enqueue -- wait for our wakeup to do that.
1067 */1086 */
1068 if (!task_on_rq_queued(p)) {1087 if (!task_on_rq_queued(p)) {
1069 replenish_dl_entity(dl_se, dl_se);1088 replenish_dl_entity(dl_se);
1070 goto unlock;1089 goto unlock;
1071 }1090 }
1072 1091
@@ -1156,7 +1175,7 @@ static inline void dl_check_constrained_dl(struct sched_dl_entity *dl_se) · 83 unmodified lines
1156 1175
1157 if (dl_time_before(dl_se->deadline, rq_clock(rq)) &&1176 if (dl_time_before(dl_se->deadline, rq_clock(rq)) &&
1158 dl_time_before(rq_clock(rq), dl_next_period(dl_se))) {1177 dl_time_before(rq_clock(rq), dl_next_period(dl_se))) {
1159 if (unlikely(dl_se->dl_boosted || !start_dl_timer(p)))1178 if (unlikely(is_dl_boosted(dl_se) || !start_dl_timer(p)))
1160 return;1179 return;
1161 dl_se->dl_throttled = 1;1180 dl_se->dl_throttled = 1;
1162 if (dl_se->runtime > 0)1181 if (dl_se->runtime > 0)
@@ -1287,7 +1306,7 @@ throttle: · 124 unmodified lines
1287 dl_se->dl_overrun = 1;1306 dl_se->dl_overrun = 1;
1288 1307
1289 __dequeue_task_dl(rq, curr, 0);1308 __dequeue_task_dl(rq, curr, 0);
1290 if (unlikely(dl_se->dl_boosted || !start_dl_timer(curr)))1309 if (unlikely(is_dl_boosted(dl_se) || !start_dl_timer(curr)))
1291 enqueue_task_dl(rq, curr, ENQUEUE_REPLENISH);1310 enqueue_task_dl(rq, curr, ENQUEUE_REPLENISH);
1292 1311
1293 if (!is_leftmost(curr, &rq->dl))1312 if (!is_leftmost(curr, &rq->dl))
@@ -1481,8 +1500,7 @@ static void __dequeue_dl_entity(struct sched_dl_entity *dl_se) · 187 unmodified lines
1481}1500}
1482 1501
1483static void1502static void
1484enqueue_dl_entity(struct sched_dl_entity *dl_se,1503enqueue_dl_entity(struct sched_dl_entity *dl_se, int flags)
1485 struct sched_dl_entity *pi_se, int flags)
1486{1504{
1487 BUG_ON(on_dl_rq(dl_se));1505 BUG_ON(on_dl_rq(dl_se));
1488 1506
@@ -1493,9 +1511,9 @@ enqueue_dl_entity(struct sched_dl_entity *dl_se, · 4 unmodified lines
1493 */1511 */
1494 if (flags & ENQUEUE_WAKEUP) {1512 if (flags & ENQUEUE_WAKEUP) {
1495 task_contending(dl_se, flags);1513 task_contending(dl_se, flags);
1496 update_dl_entity(dl_se, pi_se);1514 update_dl_entity(dl_se);
1497 } else if (flags & ENQUEUE_REPLENISH) {1515 } else if (flags & ENQUEUE_REPLENISH) {
1498 replenish_dl_entity(dl_se, pi_se);1516 replenish_dl_entity(dl_se);
1499 } else if ((flags & ENQUEUE_RESTORE) &&1517 } else if ((flags & ENQUEUE_RESTORE) &&
1500 dl_time_before(dl_se->deadline,1518 dl_time_before(dl_se->deadline,
1501 rq_clock(rq_of_dl_rq(dl_rq_of_se(dl_se))))) {1519 rq_clock(rq_of_dl_rq(dl_rq_of_se(dl_se))))) {
@@ -1512,19 +1530,7 @@ static void dequeue_dl_entity(struct sched_dl_entity *dl_se) · 10 unmodified lines
1512 1530
1513static void enqueue_task_dl(struct rq *rq, struct task_struct *p, int flags)1531static void enqueue_task_dl(struct rq *rq, struct task_struct *p, int flags)
1514{1532{
1515 struct task_struct *pi_task = rt_mutex_get_top_task(p);1533 if (is_dl_boosted(&p->dl)) {
1516 struct sched_dl_entity *pi_se = &p->dl;
1517
1518 /*
1519 * Use the scheduling parameters of the top pi-waiter task if:
1520 * - we have a top pi-waiter which is a SCHED_DEADLINE task AND
1521 * - our dl_boosted is set (i.e. the pi-waiter's (absolute) deadline is
1522 * smaller than our deadline OR we are a !SCHED_DEADLINE task getting
1523 * boosted due to a SCHED_DEADLINE pi-waiter).
1524 * Otherwise we keep our runtime and deadline.
1525 */
1526 if (pi_task && dl_prio(pi_task->normal_prio) && p->dl.dl_boosted) {
1527 pi_se = &pi_task->dl;
1528 /*1534 /*
1529 * Because of delays in the detection of the overrun of a1535 * Because of delays in the detection of the overrun of a
1530 * thread's runtime, it might be the case that a thread1536 * thread's runtime, it might be the case that a thread
@@ -1557,7 +1563,7 @@ static void enqueue_task_dl(struct rq *rq, struct task_struct *p, int flags) · 26 unmodified lines
1557 * the throttle.1563 * the throttle.
1558 */1564 */
1559 p->dl.dl_throttled = 0;1565 p->dl.dl_throttled = 0;
1560 BUG_ON(!p->dl.dl_boosted || flags != ENQUEUE_REPLENISH);1566 BUG_ON(!is_dl_boosted(&p->dl) || flags != ENQUEUE_REPLENISH);
1561 return;1567 return;
1562 }1568 }
1563 1569
@@ -1594,7 +1600,7 @@ static void enqueue_task_dl(struct rq *rq, struct task_struct *p, int flags) · 30 unmodified lines
1594 return;1600 return;
1595 }1601 }
1596 1602
1597 enqueue_dl_entity(&p->dl, pi_se, flags);1603 enqueue_dl_entity(&p->dl, flags);
1598 1604
1599 if (!task_current(rq, p) && p->nr_cpus_allowed > 1)1605 if (!task_current(rq, p) && p->nr_cpus_allowed > 1)
1600 enqueue_pushable_dl_task(rq, p);1606 enqueue_pushable_dl_task(rq, p);
@@ -2787,11 +2793,14 @@ void __dl_clear_params(struct task_struct *p) · 1186 unmodified lines
2787 dl_se->dl_bw = 0;2793 dl_se->dl_bw = 0;
2788 dl_se->dl_density = 0;2794 dl_se->dl_density = 0;
2789 2795
2790 dl_se->dl_boosted = 0;
2791 dl_se->dl_throttled = 0;2796 dl_se->dl_throttled = 0;
2792 dl_se->dl_yielded = 0;2797 dl_se->dl_yielded = 0;
2793 dl_se->dl_non_contending = 0;2798 dl_se->dl_non_contending = 0;
2794 dl_se->dl_overrun = 0;2799 dl_se->dl_overrun = 0;
2800
2801#ifdef CONFIG_RT_MUTEXES
2802 dl_se->pi_se = dl_se;
2803#endif
2795}2804}
2796 2805
2797bool dl_param_changed(struct task_struct *p, const struct sched_attr *attr)2806bool dl_param_changed(struct task_struct *p, const struct sched_attr *attr)
kernel/sched/fair.c+2−1
@@ -5477,6 +5477,7 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags) · 5476 unmodified lines
5477 struct cfs_rq *cfs_rq;5477 struct cfs_rq *cfs_rq;
5478 struct sched_entity *se = &p->se;5478 struct sched_entity *se = &p->se;
5479 int idle_h_nr_running = task_has_idle_policy(p);5479 int idle_h_nr_running = task_has_idle_policy(p);
5480 int task_new = !(flags & ENQUEUE_WAKEUP);
5480 5481
5481 /*5482 /*
5482 * The code below (indirectly) updates schedutil which looks at5483 * The code below (indirectly) updates schedutil which looks at
@@ -5549,7 +5550,7 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags) · 66 unmodified lines
5549 * into account, but that is not straightforward to implement,5550 * into account, but that is not straightforward to implement,
5550 * and the following generally works well enough in practice.5551 * and the following generally works well enough in practice.
5551 */5552 */
5552 if (flags & ENQUEUE_WAKEUP)5553 if (!task_new)
5553 update_overutilized_status(rq);5554 update_overutilized_status(rq);
5554 5555
5555enqueue_throttle:5556enqueue_throttle:
kernel/seccomp.c+2−3
@@ -38,7 +38,7 @@ · 37 unmodified lines
38#include <linux/filter.h>38#include <linux/filter.h>
39#include <linux/pid.h>39#include <linux/pid.h>
40#include <linux/ptrace.h>40#include <linux/ptrace.h>
41#include <linux/security.h>41#include <linux/capability.h>
42#include <linux/tracehook.h>42#include <linux/tracehook.h>
43#include <linux/uaccess.h>43#include <linux/uaccess.h>
44#include <linux/anon_inodes.h>44#include <linux/anon_inodes.h>
@@ -558,8 +558,7 @@ static struct seccomp_filter *seccomp_prepare_filter(struct sock_fprog *fprog) · 513 unmodified lines
558 * behavior of privileged children.558 * behavior of privileged children.
559 */559 */
560 if (!task_no_new_privs(current) &&560 if (!task_no_new_privs(current) &&
561 security_capable(current_cred(), current_user_ns(),561 !ns_capable_noaudit(current_user_ns(), CAP_SYS_ADMIN))
562 CAP_SYS_ADMIN, CAP_OPT_NOAUDIT) != 0)
563 return ERR_PTR(-EACCES);562 return ERR_PTR(-EACCES);
564 563
565 /* Allocate a new seccomp_filter */564 /* Allocate a new seccomp_filter */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t