Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1482246
| From | Davidlohr Bueso <dave@stgolabs.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/5] ipc/sem: do not call wake_sem_queue_do() prematurely |
| Date | 2016-09-13 10:20 +0200 |
| Message-ID | <sgR6G-7I4-29@gated-at.bofh.it> (permalink) |
| References | <sgy41-2Jz-5@gated-at.bofh.it> <sgy41-2Jz-7@gated-at.bofh.it> <sgNmq-4WR-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 1/5] ipc/sem: do not call wake_sem_queue_do() prematurely Davidlohr Bueso <dave@stgolabs.net> - 2016-09-12 14:00 +0200
Re: [PATCH 1/5] ipc/sem: do not call wake_sem_queue_do() prematurely Manfred Spraul <manfred@colorfullife.com> - 2016-09-13 06:20 +0200
Re: [PATCH 1/5] ipc/sem: do not call wake_sem_queue_do() prematurely Davidlohr Bueso <dave@stgolabs.net> - 2016-09-13 10:20 +0200
csiph-web