• Jonathan Corbet's avatar
    [PATCH] Char drivers: cdev_unmap() · d4f63c8a
    Jonathan Corbet authored
    To recap my argument: the current cdev implementation keeps an uncounted
    reference to every cdev in cdev_map.  Creators of cdevs must know to call
    cdev_unmap() with the same arguments they passed to cdev_add() before
    releasing the device, or that reference will remain and will oops the
    kernel should user space attempt to open the (missing) device.  It's an
    easy mistake to make, and, IMO, entirely unnecessary; the cdev code should
    be able to do its own bookkeeping.
    d4f63c8a
video1394.c 40.9 KB