Skip to content

Commit b7b8ff6

Browse files
oleg-nesterovtorvalds
authored andcommitted
signals: kill the awful task_rq_unlock_wait() hack
Now that task->signal can't go away we can revert the horrible hack added by ad474ca ("fix for account_group_exec_runtime(), make sure ->signal can't be freed under rq->lock"). And we can do more cleanups sched_stats.h/posix-cpu-timers.c later. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <peterz@infradead.org> Acked-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 4ada856 commit b7b8ff6

File tree

3 files changed

+0
-14
lines changed

3 files changed

+0
-14
lines changed

include/linux/sched.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,6 @@ extern void init_idle(struct task_struct *idle, int cpu);
268268
extern void init_idle_bootup_task(struct task_struct *idle);
269269

270270
extern int runqueue_is_locked(int cpu);
271-
extern void task_rq_unlock_wait(struct task_struct *p);
272271

273272
extern cpumask_var_t nohz_cpu_mask;
274273
#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ)

kernel/exit.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,6 @@ static void __exit_signal(struct task_struct *tsk)
145145
if (sig) {
146146
flush_sigqueue(&sig->shared_pending);
147147
taskstats_tgid_free(sig);
148-
/*
149-
* Make sure ->signal can't go away under rq->lock,
150-
* see account_group_exec_runtime().
151-
*/
152-
task_rq_unlock_wait(tsk);
153148
tty_kref_put(tty);
154149
}
155150
}

kernel/sched.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -969,14 +969,6 @@ static struct rq *task_rq_lock(struct task_struct *p, unsigned long *flags)
969969
}
970970
}
971971

972-
void task_rq_unlock_wait(struct task_struct *p)
973-
{
974-
struct rq *rq = task_rq(p);
975-
976-
smp_mb(); /* spin-unlock-wait is not a full memory barrier */
977-
raw_spin_unlock_wait(&rq->lock);
978-
}
979-
980972
static void __task_rq_unlock(struct rq *rq)
981973
__releases(rq->lock)
982974
{

0 commit comments

Comments
 (0)