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: <20170307174504.GC3312@twins.programming.kicks-ass.net>
Date:   Tue, 7 Mar 2017 18:45:04 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Waiman Long <longman@...hat.com>
Cc:     Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] locking/rwsem: Make rwsem_is_contended() track status of
 OSQ

On Tue, Mar 07, 2017 at 11:03:48AM -0500, Waiman Long wrote:
> It was found that the current rwsem_is_contended() function did not
> look at the status of the OSQ and hence would miss waiters on OSQ. So
> that function is now modified to look at the OSQ as well.

Ideally I'd kill the entire function.

	if (need_resched() ||
	    rwsem_is_contended(&fs_info->commit_root_sem)) {
		if (wakeup)
			caching_ctl->progress = last;
		btrfs_release_path(path);
		up_read(&fs_info->commit_root_sem);
		mutex_unlock(&caching_ctl->mutex);
		cond_resched();
		mutex_lock(&caching_ctl->mutex);
		down_read(&fs_info->commit_root_sem);
		goto next;
	}

is the only user of it in the entire tree and it makes no bloody sense
what so ever. rwsem is a preemptible lock after all.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ