if (unlikely(timer->it.cpu.firing)) { 
if (unlikely(ret)) { 
int posix_cpu_timer_set(struct k_itimer *timer, int flags,			struct itimerspec *new, struct itimerspec *old){	struct task_struct *p = timer->it.cpu.task;	union cpu_time_count old_expires, new_expires, val;	int ret;	if (unlikely(p == NULL)) {		/*		 * Timer refers to a dead task's clock.		 */		return -ESRCH;	}	new_expires = timespec_to_sample(timer->it_clock, &new->it_value);	read_lock(&tasklist_lock);	/*	 * We need the tasklist_lock to protect against reaping that	 * clears p->signal.  If p has just been reaped, we can no	 * longer get any information about it at all.	 */	if (unlikely(p->signal == NULL)) {		read_unlock(&tasklist_lock);		put_task_struct(p);		timer->it.cpu.task = NULL;		return -ESRCH;	}	/*	 * Disarm any old timer after extracting its expiry time.	 */	BUG_ON(!irqs_disabled());	spin_lock(&p->sighand->siglock);	old_expires = timer->it.cpu.expires;	list_del_init(&timer->it.cpu.entry);	spin_unlock(&p->sighand->siglock);	/*	 * We need to sample the current value to convert the new	 * value from to relative and absolute, and to convert the	 * old value from absolute to relative.  To set a process	 * timer, we need a sample to balance the thread expiry	 * times (in arm_timer).  With an absolute time, we must	 * check if it's already passed.  In short, we need a sample.	 */	if (CPUCLOCK_PERTHREAD(timer->it_clock)) {		cpu_clock_sample(timer->it_clock, p, &val);	} else {		cpu_clock_sample_group(timer->it_clock, p, &val);	}	if (old) {		if (old_expires.sched == 0) {			old->it_value.tv_sec = 0;			old->it_value.tv_nsec = 0;		} else {			/*			 * Update the timer in case it has			 * overrun already.  If it has,			 * we'll report it as having overrun			 * and with the next reloaded timer			 * already ticking, though we are			 * swallowing that pending			 * notification here to install the			 * new setting.			 */			bump_cpu_timer(timer, val);			if (cpu_time_before(timer->it_clock, val,					    timer->it.cpu.expires)) {				old_expires = cpu_time_sub(					timer->it_clock,					timer->it.cpu.expires, val);				sample_to_timespec(timer->it_clock,						   old_expires,						   &old->it_value);			} else {				old->it_value.tv_nsec = 1;				old->it_value.tv_sec = 0;			}		}	}	if (unlikely(timer->it.cpu.firing)) {		/*		 * We are colliding with the timer actually firing.		 * Punt after filling in the timer's old value, and		 * disable this firing since we are already reporting		 * it as an overrun (thanks to bump_cpu_timer above).		 */		read_unlock(&tasklist_lock);		timer->it.cpu.firing = -1;		ret = TIMER_RETRY;		goto out;	}	if (new_expires.sched != 0 && !(flags & TIMER_ABSTIME)) {		cpu_time_add(timer->it_clock, &new_expires, val);	}	/*	 * Install the new expiry time (or zero).	 * For a timer with no notification action, we don't actually	 * arm the timer (we'll just fake it for timer_gettime).	 */	timer->it.cpu.expires = new_expires;	if (new_expires.sched != 0 &&	    (timer->it_sigev_notify & ~SIGEV_THREAD_ID) != SIGEV_NONE &&	    cpu_time_before(timer->it_clock, val, new_expires)) {		arm_timer(timer, val);	}	read_unlock(&tasklist_lock);	/*	 * Install the new reload setting, and	 * set up the signal and overrun bookkeeping.	 */	timer->it.cpu.incr = timespec_to_sample(timer->it_clock,						&new->it_interval);	/*	 * This acts as a modification timestamp for the timer,	 * so any automatic reload attempt will punt on seeing	 * that we have reset the timer manually.	 */	timer->it_requeue_pending = (timer->it_requeue_pending + 2) &		~REQUEUE_PENDING;	timer->it_overrun_last = 0;	timer->it_overrun = -1;	if (new_expires.sched != 0 &&	    (timer->it_sigev_notify & ~SIGEV_THREAD_ID) != SIGEV_NONE &&	    !cpu_time_before(timer->it_clock, val, new_expires)) {		/*		 * The designated time already passed, so we notify		 * immediately, even if the thread never runs to		 * accumulate more time on this clock.		 */		cpu_timer_fire(timer);	}	ret = 0; out:	if (old) {		sample_to_timespec(timer->it_clock,				   timer->it.cpu.incr, &old->it_interval);	}	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/a69ac4a78d8bd9e1ec478bd7297d4f047fcd44a8/posix-cpu-timers.c/buggy/kernel/posix-cpu-timers.c