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: <20160913081441.GA32365@linux-80c1.suse>
Date:   Tue, 13 Sep 2016 01:14:41 -0700
From:   Davidlohr Bueso <dave@...olabs.net>
To:     Manfred Spraul <manfred@...orfullife.com>
Cc:     akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
        Davidlohr Bueso <dbueso@...e.de>
Subject: Re: [PATCH 1/5] ipc/sem: do not call wake_sem_queue_do() prematurely

On Tue, 13 Sep 2016, Manfred Spraul wrote:

>>-	if (ipcperms(ns, &sma->sem_perm, alter ? S_IWUGO : S_IRUGO))
>>-		goto out_rcu_wakeup;
>>+	if (ipcperms(ns, &sma->sem_perm, alter ? S_IWUGO : S_IRUGO)) {
>>+		rcu_read_unlock();
>>+		goto out_free;
>>+	}
>Is this really better/simpler?
>You replace "if (error) goto cleanup" with "if (error) {cleanup_1(); 
>goto cleanup_2()}".

I believe it is better as it clearly separates blocking from non-blocking
exit paths. Overhead of course is irrelevant in both in-house wake_up_sem_queue_do
and wake_up_q.

Thanks,
Davidlohr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ