From: Dan Carpenter <error27@gmail.com>
To: linux-media@vger.kernel.org
Cc: mchehab@infradead.org
Subject: bttv locking problem
Date: Sun, 29 Nov 2009 18:00:34 +0200 [thread overview]
Message-ID: <20091129160034.GK10640@bicker> (raw)
Hello,
I did a smatch static checker run and found a double unlock in
bttv-driver.c.
drivers/media/video/bt8xx/bttv-driver.c +3203 bttv_poll() error: double unlock '&fh->cap.vb_lock'
I would fix it myself, but I don't know if the poll_wait() is supposed
to be protected by mutex_unlock(&fh->cap.vb_lock) or not.
drivers/media/video/bt8xx/bttv-driver.c
3192 mutex_unlock(&fh->cap.vb_lock);
3193 buf = (struct bttv_buffer*)fh->cap.read_buf;
3194 }
3195
3196 poll_wait(file, &buf->vb.done, wait);
3197 if (buf->vb.state == VIDEOBUF_DONE ||
3198 buf->vb.state == VIDEOBUF_ERROR)
3199 rc = POLLIN|POLLRDNORM;
3200 else
3201 rc = 0;
3202 err:
3203 mutex_unlock(&fh->cap.vb_lock);
regards,
dan carpenter
reply other threads:[~2009-11-29 16:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20091129160034.GK10640@bicker \
--to=error27@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox