From: dhylands@gmail.com (Dave Hylands)
To: kernelnewbies@lists.kernelnewbies.org
Subject: unlocked_ioctl explanation
Date: Tue, 17 May 2011 23:20:57 -0700 [thread overview]
Message-ID: <BANLkTinvoRo7ZsK5A6orML7eM9mTd+ZD5g@mail.gmail.com> (raw)
In-Reply-To: <669504.52385.qm@web39322.mail.mud.yahoo.com>
Hi Ezequiel,
2011/5/17 Ezequiel Garc?a <elezegarcia@yahoo.com.ar>
>
> I am aware that ioctl has been superseeded by unlocked_ioctl. I've been looking through patches and this seems to be BKL related.
>
> Could someone explain further the differences and reasons for the new ioctl prototype and name?
>
> I guess 'unlocked' means BKL is no longer held inside ioctl, right?
Exaclty.
> What precautions should we take when using unlocked_ioctl ?
Well, since there is no BKL, your ioctl can get preempted by another
process and that other process just might happen to make an ioctl call
to your driver.
So your driver has to protect itself from being called by 2 threads
simultaneously, if that's a problem.
Some drivers won't need any extra protection. Unfortunately, it really
depends on exactly what your driver code does.
--
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com
next prev parent reply other threads:[~2011-05-18 6:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-18 3:23 unlocked_ioctl explanation Ezequiel García
2011-05-18 6:20 ` Dave Hylands [this message]
2011-05-19 17:53 ` Ezequiel García
2011-05-19 19:11 ` Daniel Baluta
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=BANLkTinvoRo7ZsK5A6orML7eM9mTd+ZD5g@mail.gmail.com \
--to=dhylands@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.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;
as well as URLs for NNTP newsgroup(s).