• L
    rtnetlink: Replace implementation of ASSERT_RTNL() macro with WARN_ONCE() · 66364bdf
    Leon Romanovsky 提交于
    ASSERT_RTNL() macro is actual open-coded variant of WARN_ONCE() with
    two exceptions. First, it prints stack for multiple hits and not only
    once as WARN_ONCE() does. Second, the user can disable prints of
    WARN_ONCE by setting CONFIG_BUG to N.
    
    The multiple prints of dump stack are actually not needed, because calls
    without rtnl lock are programming errors and user can't do anything
    about them except to complain to the mailing list after first occurrence
    of such failure.
    
    The user who disabled BUG/WARN prints did it explicitly because by default
    in upstream kernel and distributions this option is enabled. It means
    that user doesn't want to see prints about missing locks too.
    
    This patch replaces open-coded variant in favor of already existing
    macro and change error prints to be once only.
    Reviewed-by: NMark Bloch <markb@mellanox.com>
    Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    66364bdf
rtnetlink.h 4.2 KB