Skip to content
  • Stefan Richter's avatar
    firewire: nosy: convert to unlocked ioctl · c7b2a99c
    Stefan Richter authored
    
    
    The required serialization of NOSY_IOC_START and NOSY_IOC_STOP is
    already provided by the client_list_lock.
    
    NOSY_IOC_FILTER does not really require serialization since accesses
    to tcode_mask are atomic on any sane CPU architecture.  Nevertheless,
    make it explicit that we want this to be atomic by means of
    client_list_lock (which also surrounds the other tcode_mask access in
    the IRQ handler).  While we are at it, change the type of tcode_mask to
    u32 for consistency with the user API.
    
    NOSY_IOC_GET_STATS does not require serialization against itself.  But
    there is a bug here regarding concurrent updates of the two counters
    by the IRQ handler.  Fix it by taking the client_list_lock in this ioctl
    too.
    
    Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
    c7b2a99c