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: <CA+OjSzxRLn+AvMy9W0h1jsqD_Lgp87RhoUihm22aM3X=be2S3A@mail.gmail.com>
Date:	Wed, 31 Aug 2011 18:35:24 +0530
From:	sifram rajas <sifram.rajas@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: Re: General question about TASK_INTERRUPTIBLE and schedule_timeout()

Hi,

If this is a problem, then can this be solved by disabling preemption
in the following
manner ? :
preempt_disable() ;
set_current_state(TASK_INTERRUPTIBLE) ;
schedule_timeout(<some value>);
preempt_enable() ;



On Wed, Aug 31, 2011 at 6:18 PM, sifram rajas <sifram.rajas@...il.com> wrote:
> Hi,
>
> I have a general question about the following 2 lines of code I see
> all over the kernel:
> 1         set_current_state(TASK_INTERRUPTIBLE) ;
> 2         schedule_timeout(<some value>);
>
> In the above code, if we encounter an interrupt after executing line
> 1, we will end up
> call schedule() from the architecture specific code for CONFIG_PREEMPT
> kernels, after
> the interrupt handler has been invokled.
>
> This will cause the current task to sleep interruptibly forever
> instead of for a certain timeout interval.
>
> Won't this defeat the purpose of the above code to schedule out or
> sleep for a certain finite timeout ?
> If yes, then what are the techniques to solve this problem ?
>
>
> Thanks,
> Sifram.
>
--
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