[lkml]   [2012]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH v2 1/2] dma-buf: add reference counting for exporter module
    Hi Greg,

    On 08/09/2012 04:23 PM, Greg KH wrote:
    > On Thu, Aug 09, 2012 at 11:36:21AM +0200, Tomasz Stanislawski wrote:
    >> This patch adds reference counting on a module that exported dma-buf and
    >> implements its operations. This prevents the module from being unloaded while
    >> DMABUF file is in use.
    > Why force all of the modules to be changed "by hand", and not just do
    > this automatically by changing the register function to include the
    > THIS_MODULE macro in it? Much like the pci_register_driver() function
    > is implemented in include/linux/pci.h?

    Thank you for the hint.

    The owner field belongs to dma_buf_ops structure that is often a 'const'
    entity. Therefore owner field would have to be moved to 'struct dma_buf'
    to avoid 'deconstification' issues.

    Tomasz Stanislawski

    > That makes it impossible for driver authors to get it wrong, which is
    > always a good sign of a correct api.
    > thanks,
    > greg k-h

     \ /
      Last update: 2012-08-09 17:42    [W:0.022 / U:27.076 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site