• Vladimir Oltean's avatar
    net: dsa: sja1105: Fix memory leak on meta state machine error path · 93fa8587
    Vladimir Oltean authored
    When RX timestamping is enabled and two link-local (non-meta) frames are
    received in a row, this constitutes an error.
    
    The tagger is always caching the last link-local frame, in an attempt to
    merge it with the meta follow-up frame when that arrives. To recover
    from the above error condition, the initial cached link-local frame is
    dropped and the second frame in a row is cached (in expectance of the
    second meta frame).
    
    However, when dropping the initial link-local frame, its backing memory
    was being leaked.
    
    Fixes: f3097be2 ("net: dsa: sja1105: Add a state machine for RX timestamping")
    Signed-off-by: default avatarVladimir Oltean <olteanv@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    93fa8587
tag_sja1105.c 8.57 KB