From: Peter Rajnoha <prajnoha@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH 3/4] Udev integration: add cookie support for dmsetup
Date: Tue, 21 Apr 2009 21:07:56 +0200 [thread overview]
Message-ID: <49EE198C.6070404@redhat.com> (raw)
In-Reply-To: <1240338838.3705.63.camel@f10-node1>
On 04/21/2009 08:33 PM, Dave Wysochanski wrote:
>> - if (!dm_task_run(dmt))
>> + if (!dm_notification_sem_open(&cookie) ||
>> + !dm_notification_sem_inc(cookie) ||
>> + !dm_task_set_cookie(dmt, cookie))
>> goto out;
>>
>> + if (!dm_task_run(dmt)) {
>> + dm_notification_sem_close(cookie);
>> + goto out;
>> + }
>> +
>> + dm_notification_sem_wait_zero(cookie);
>> + dm_notification_sem_close(cookie);
>> +
>> r = 1;
>
>
> This piece of code could exit without cleanup of the semaphore. Should
> the first 'if' only check !dm_notification_sem_open, and the sem_inc and
> set_cookie be '||'d with dm_task_run in the second 'if'?
Oh, sure. I have to correct this. Thanks!
Peter
prev parent reply other threads:[~2009-04-21 19:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-08 12:24 [PATCH 3/4] Udev integration: add cookie support for dmsetup Peter Rajnoha
2009-04-15 18:52 ` Alasdair G Kergon
2009-04-20 10:45 ` Peter Rajnoha
2009-04-21 18:33 ` Dave Wysochanski
2009-04-21 19:07 ` Peter Rajnoha [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49EE198C.6070404@redhat.com \
--to=prajnoha@redhat.com \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.