[Bug 201611] [patch] Add devfs_get_cdevpriv_from_file(9)

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Sep 18 19:48:45 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=201611

Konstantin Belousov <kib at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kib at FreeBSD.org

--- Comment #2 from Konstantin Belousov <kib at FreeBSD.org> ---
(In reply to Andy Ritger from comment #0)
I do not quite understand this.

Lets clarify the notational system first.  I propose to rename the file
descriptor we talk about in the context of the process B as fdb.  Also, we note
that both fd (from the process A filedescriptors namespace) and fdb (from B)
point to the same file F.

In the process B, to retrieve the video memory associated with F, you perform
some kernel call, most likely ioctl(fdb, OPcode, ...).  Then, during the call
to the ioctl handler for OPcode, you get the same pointer to the file private
data F by devfs_get_cdevpriv().  It does not matter if it is in context of
ioctl(fd, OP1code) in A or in context of ioctl(fdb, OPcode) in B.  The
underlying file is same, since it was passed by ancillary data, and cdevpriv is
same.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list