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] [day] [month] [year] [list]
Message-ID: <20061213200422.GA992@elte.hu>
Date:	Wed, 13 Dec 2006 21:04:22 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Mark Fasheh <mark.fasheh@...cle.com>
Cc:	linux-kernel@...r.kernel.org, akpm@...l.org, jim.houston@...r.com,
	sunil.mushran@...cle.com
Subject: Re: [PATCH] Conditionally check expected_preempt_count in __resched_legal()


* Mark Fasheh <mark.fasheh@...cle.com> wrote:

> Commit 2d7d253548cffdce80f4e03664686e9ccb1b0ed7 ("fix cond_resched() fix")
> introduced an 'expected_preempt_count' parameter to __resched_legal() to fix
> a bug where it was returning a false negative when called from
> cond_resched_lock() and preemption was enabled.
> 
> Unfortunately this broke things for when preemption is disabled.
> preempt_count() will always return zero, thus failing the check against
> any value of expected_preempt_count not equal to zero. cond_resched_lock()
> for example, passes an expected_preempt_count value of 1.
> 
> So fix the fix for the cond_resched() fix by skipping the check of
> preempt_count() against expected_preempt_count when preemption is disabled.
> 
> Credit should go to Sunil Mushran for spotting the bug during testing.
> 
> Signed-off-by: Mark Fasheh <mark.fasheh@...cle.com>

well spotted. I'm wondering whether this piece of code has the highest 
amount of fixes per line of code ratio in the whole kernel ...

Acked-by: Ingo Molnar <mingo@...e.hu>

	Ingo
-
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