• Michael Ellerman's avatar
    [PATCH] ppc64: make HvLpEvent_unregisterHandler() work · 451321d6
    Michael Ellerman authored
    When the iseries_veth driver module is unloaded there is the potential for
    an oops and also some memory leakage.
    
    Because the HvLpEvent_unregisterHandler() function did no synchronisation,
    it was possible for the handler that was being unregistered to be running
    on another CPU *after* HvLpEvent_unregisterHandler() had returned.  This
    could cause the iseries_veth driver to leave work in the events work queue
    after the module had been unloaded.  When that work was eventually executed
    we got an oops.
    
    In addition some of the data structures in the iseries_veth driver were not
    being correctly freed when the module was unloaded.
    
    This is the first patch, which makes HvLpEvent_unregisterHandler() work.
    Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    451321d6
HvLpEvent.h 4.81 KB