• Tom Parkin's avatar
    l2tp: WARN_ON rather than BUG_ON in l2tp_session_free · ab6934e0
    Tom Parkin authored
    l2tp_session_free called BUG_ON if the tunnel magic feather value wasn't
    correct.  The intent of this was to catch lifetime bugs; for example
    early tunnel free due to incorrect use of reference counts.
    
    Since the tunnel magic feather being wrong indicates either early free
    or structure corruption, we can avoid doing more damage by simply
    leaving the tunnel structure alone.  If the tunnel refcount isn't
    dropped when it should be, the tunnel instance will remain in the
    kernel, resulting in the tunnel structure and socket leaking.
    Signed-off-by: default avatarTom Parkin <tparkin@katalix.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ab6934e0
l2tp_core.c 47.1 KB