[lkml]   [2001]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [patch] ess maestro, support for hardware volume control
    Alan Cox <> writes:

    > > BTW, what is the officially approved way to open a device on a
    > > dynamic misc minor? Reading /proc/misc for the minor number,
    > Ask for minor 0 I believe, then load the module then see what you got.
    > > then mknod'ing a device and opening it seems to me to have a
    > > nasty race condition, am I missing something here?

    I think that's not what I was thinking of, here's an outline.
    What can happen as I see it is that userspace #2, which wants to
    talk to a particular misc driver, actually ends up talking to a
    different one because the minor gets reassigned between reading
    /proc/misc to find out the number and mknoding and opening the

    kernel userspace #1 userspace #2
    ------ ------------ ------------
    insmod maestro
    grab a misc minor
    read /proc/misc
    mknod device
    rmmod maestro
    release misc minor
    insmod something else
    grab same misc minor
    open device
    read from device

    Is this just something where you say "don't let that happen",

    I didn't really want to use a dynamic minor but Linus doesn't
    want to give out any more fixed assignments, right?

    > Ultimately if its a device of its own it probably wants to be part of the
    > input device frame work - as for example the volume knob on my USB speakers is

    Any idea what code I should be looking at to do something like
    that, drivers/usb/audio.c is a big file (is it in there or
    somewhere else?).


    Regarding a Microsoft/Xerox agreement:
    "This is a match made in heaven.
    Both companies excel at copying other people's work." <URL:>
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 12:55    [W:0.025 / U:38.624 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site