lkml.org 
[lkml]   [2016]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2016-09-17 09:59    [W:1.444 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site