• Herbert Xu's avatar
    [IPSEC]: Fix OOPS when deleting an ip address. · 6ee9ceee
    Herbert Xu authored
    Looks like I was too hasty in blaming myself :) Although my patch does
    fix a real bug, it cannot have been responsible for the crash that the OP
    reported.  The reason is that the state timer always keeps a reference to
    the state so even if it is incorrectly re-added the reference will prevent
    the crash.
    
    Hence the problem is still a bug in the ref counting.  I think I've found
    the real culprit now.  __xfrm?_find_acq() is missing an xfrm_state_hold
    on the create path.  This also explains why I never see it myself since
    Openswan never creates states through that code-path.
    6ee9ceee
xfrm4_state.c 3.04 KB