From: Srinivas KANDAGATLA <srinivas.kandagatla@st.com>
To: Sean Young <sean@mess.org>
Cc: linux-media@vger.kernel.org, alipowski@interia.pl,
Mauro Carvalho Chehab <mchehab@redhat.com>,
linux-kernel@vger.kernel.org, srinivas.kandagatla@gmail.com
Subject: Re: [PATCH v1 1/2] media: rc: Add user count to rc dev.
Date: Fri, 19 Jul 2013 12:07:31 +0100 [thread overview]
Message-ID: <51E91DF3.50002@st.com> (raw)
In-Reply-To: <20130719110147.GA1104@pequod.mess.org>
On 19/07/13 12:01, Sean Young wrote:
>> + int rval = 0;
>>
>> - return rdev->open(rdev);
>> + if (!rdev->users++)
>> + rval = rdev->open(rdev);
>> +
>> + if (rval)
>> + rdev->users--;
>> +
>> + return rval;
>
> This looks racey. Some locking is needed, I think rc_dev->lock should work
> fine for this. Here and in the lirc code path too.
thanks Sean,
It makes sense, will fix this in v2.
Srini
>
> Sean
>
>> }
>
next prev parent reply other threads:[~2013-07-19 11:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-19 8:38 [PATCH v1 0/2] Allow rc device to open from lirc Srinivas KANDAGATLA
2013-07-19 8:39 ` [PATCH v1 1/2] media: rc: Add user count to rc dev Srinivas KANDAGATLA
2013-07-19 11:01 ` Sean Young
2013-07-19 11:07 ` Srinivas KANDAGATLA [this message]
2013-07-19 8:39 ` [PATCH v1 2/2] media: lirc: Allow lirc dev to talk to rc device Srinivas KANDAGATLA
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=51E91DF3.50002@st.com \
--to=srinivas.kandagatla@st.com \
--cc=alipowski@interia.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=sean@mess.org \
--cc=srinivas.kandagatla@gmail.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.