diff options
author | Tim Hockin <thockin@google.com> | 2007-07-21 17:10:35 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-21 18:37:10 -0700 |
commit | f528e7ba28492e363a64c80c414ded4cadf48f89 (patch) | |
tree | 2bf7371d9d5594581cb0b6b9a9b85b651f7d7e28 /Documentation | |
parent | a5ba7971045a90a36cef8f7d5a3075600b475b74 (diff) | |
download | op-kernel-dev-f528e7ba28492e363a64c80c414ded4cadf48f89.zip op-kernel-dev-f528e7ba28492e363a64c80c414ded4cadf48f89.tar.gz |
x86_64: O_EXCL on /dev/mcelog
Background:
/dev/mcelog is a clear-on-read interface. It is currently possible for
multiple users to open and read() the device. Users are protected from
each other during any one read, but not across reads.
Description:
This patch adds support for O_EXCL to /dev/mcelog. If a user opens the
device with O_EXCL, no other user may open the device (EBUSY). Likewise,
any user that tries to open the device with O_EXCL while another user has
the device will fail (EBUSY).
Result:
Applications can get exclusive access to /dev/mcelog. Applications that
do not care will be unchanged.
Alternatives:
A simpler choice would be to only allow one open() at all, regardless of
O_EXCL.
Testing:
I wrote an application that opens /dev/mcelog with O_EXCL and observed
that any other app that tried to open /dev/mcelog would fail until the
exclusive app had closed the device.
Caveats:
None.
Signed-off-by: Tim Hockin <thockin@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions