• O
    can: fix multiple delivery of a single CAN frame for overlapping CAN filters · 514ac99c
    Oliver Hartkopp 提交于
    The CAN_RAW socket can set multiple CAN identifier specific filters that lead
    to multiple filters in the af_can.c filter processing. These filters are
    indenpendent from each other which leads to logical OR'ed filters when applied.
    
    This patch makes sure that every CAN frame which is filtered for a specific
    socket is only delivered once to the user space. This is independent from the
    number of matching CAN filters of this socket.
    
    As the raw_rcv() function is executed from NET_RX softirq the introduced
    variables are implemented as per-CPU variables to avoid extensive locking at
    CAN frame reception time.
    Signed-off-by: NOliver Hartkopp <socketcan@hartkopp.net>
    Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
    514ac99c
raw.c 18.9 KB