linux-next: manual merge of the tip tree with the limits tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

Today's linux-next merge of the tip tree got a conflict in
kernel/posix-cpu-timers.c between commit
0c1b5ce8de67c36bbf67db38240a91f358133bdd ("core: add task_struct to
update_rlimit_cpu") from the limits tree and commit
f55db609042faecd5e518ce372b87f846659b32e ("cpu-timers: Simplify
RLIMIT_CPU handling") from the tip tree.

I did the obvious fixup (see below) but it is probably not completely
correct.   Jiri, did I see Linus ask for major revisions of the writable
limits work?
-- 
Cheers,
Stephen Rothwell                    sfr@xxxxxxxxxxxxxxxx

diff --cc kernel/posix-cpu-timers.c
index 2807ef8,799f360..0000000
--- a/kernel/posix-cpu-timers.c
+++ b/kernel/posix-cpu-timers.c
@@@ -11,19 -11,18 +11,18 @@@
  #include <trace/events/timer.h>
  
  /*
-  * Called after updating RLIMIT_CPU to set timer expiration if necessary.
+  * Called after updating RLIMIT_CPU to run cpu timer and update
+  * tsk->signal->cputime_expires expiration cache if necessary. Needs
+  * siglock protection since other code may update expiration cache as
+  * well.
   */
 -void update_rlimit_cpu(unsigned long rlim_new)
 +void update_rlimit_cpu(struct task_struct *task, unsigned long rlim_new)
  {
  	cputime_t cputime = secs_to_cputime(rlim_new);
- 	struct signal_struct *const sig = task->signal;
  
- 	if (cputime_eq(sig->it[CPUCLOCK_PROF].expires, cputime_zero) ||
- 	    cputime_gt(sig->it[CPUCLOCK_PROF].expires, cputime)) {
- 		spin_lock_irq(&task->sighand->siglock);
- 		set_process_cpu_timer(task, CPUCLOCK_PROF, &cputime, NULL);
- 		spin_unlock_irq(&task->sighand->siglock);
- 	}
 -	spin_lock_irq(&current->sighand->siglock);
 -	set_process_cpu_timer(current, CPUCLOCK_PROF, &cputime, NULL);
 -	spin_unlock_irq(&current->sighand->siglock);
++	spin_lock_irq(&task->sighand->siglock);
++	set_process_cpu_timer(task, CPUCLOCK_PROF, &cputime, NULL);
++	spin_unlock_irq(&task->sighand->siglock);
  }
  
  static int check_clock(const clockid_t which_clock)
--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux