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>] [day] [month] [year] [list]
Date:	Thu, 22 Feb 2007 11:00:16 +0800
From:	"Dong Feng" <middle.fengdong@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: PREEMP_ACTIVE in cond_resched

cond_resched() checks and conditionally sets PREEMPT_ACTIVE flag for
the current task. The comments says,

/*
* The BKS might be reacquired before we have dropped
* PREEMPT_ACTIVE, which could trigger a second
* cond_resched() call.
*/

My understanding is that cond_resched() would be indirectly invoked
twice recursively, through the following path,

cond_resched() -> schedule() -> reacquire_kernel_lock() -> down() ->
might_sleep() -> might_resched() -> cond_resched().

However, the above path is possible only in a voluntary-preemptive
kernel. In a full-preemptive kernel, I do not find any possible path
to cause recursive cond_resched(). Does that mean we can actually
remove the check and setting of PREEMPT_ACTIVE for a full-preemptive
kernel?
-
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