lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKohpokjYVUo1+wSdyuwGRnDGAq6XeS-EPRjv4gg96TWM3+bdg@mail.gmail.com>
Date:	Wed, 9 Jul 2014 20:55:02 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Chris Redpath <Chris.Redpath@....com>
Cc:	"tglx@...utronix.de" <tglx@...utronix.de>,
	"linaro-kernel@...ts.linaro.org" <linaro-kernel@...ts.linaro.org>,
	"fweisbec@...il.com" <fweisbec@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"preeti@...ux.vnet.ibm.com" <preeti@...ux.vnet.ibm.com>,
	Arvind Chauhan <Arvind.Chauhan@....com>
Subject: Re: [RFC 2/7] hrtimer: don't check for active hrtimer after adding it

On 9 July 2014 16:04, Chris Redpath <Chris.Redpath@....com> wrote:
> On 09/07/14 07:55, Viresh Kumar wrote:
>> diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
>> index cf40209..a76f962 100644
>> --- a/kernel/hrtimer.c
>> +++ b/kernel/hrtimer.c
>> @@ -1555,8 +1555,6 @@ static int __sched do_nanosleep(struct
>> hrtimer_sleeper *t, enum hrtimer_mode mod
>>         do {
>>                 set_current_state(TASK_INTERRUPTIBLE);
>>                 hrtimer_start_expires(&t->timer, mode);
>> -               if (!hrtimer_active(&t->timer))
>> -                       t->task = NULL;
>>
>>                 if (likely(t->task))
>>                         freezable_schedule();
>> @@ -1837,8 +1835,6 @@ schedule_hrtimeout_range_clock(ktime_t *expires,
>> unsigned long delta,
>>         hrtimer_init_sleeper(&t, current);
>>
>>         hrtimer_start_expires(&t.timer, mode);
>> -       if (!hrtimer_active(&t.timer))
>> -               t.task = NULL;
>>
>>         if (likely(t.task))
>>                 schedule();
>>
>
> Maybe safe to remove this if condition too.


Included following diff to this patch:

diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index a76f962..ae7b5cf 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -1556,8 +1556,7 @@ static int __sched do_nanosleep(struct
hrtimer_sleeper *t, enum hrtimer_mode mod
                set_current_state(TASK_INTERRUPTIBLE);
                hrtimer_start_expires(&t->timer, mode);

-               if (likely(t->task))
-                       freezable_schedule();
+               freezable_schedule();

                hrtimer_cancel(&t->timer);
                mode = HRTIMER_MODE_ABS;
@@ -1836,8 +1835,7 @@ schedule_hrtimeout_range_clock(ktime_t *expires,
unsigned long delta,

        hrtimer_start_expires(&t.timer, mode);

-       if (likely(t.task))
-               schedule();
+       schedule();

        hrtimer_cancel(&t.timer);
        destroy_hrtimer_on_stack(&t.timer);



Latest changes are pushed to my branch in case someone is looking to
test them.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ