diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2019-10-09 15:48:48 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2019-11-04 21:47:21 +0100 |
commit | 6caf8a6d6586d44fd72f4aa1021d14aa82affafb (patch) | |
tree | 96243b9cd81e04afe92044091634060044d367c8 /drivers/net/wan | |
parent | ca913f1ac024559ebc17f0b599af262f0ad997c9 (diff) |
can: rx-offload: can_rx_offload_queue_tail(): fix error handling, avoid skb mem leak
If the rx-offload skb_queue is full can_rx_offload_queue_tail() will not
queue the skb and return with an error.
This patch frees the skb in case of a full queue, which brings
can_rx_offload_queue_tail() in line with the
can_rx_offload_queue_sorted() function, which has been adjusted in the
previous patch.
The return value is adjusted to -ENOBUFS to better reflect the actual
problem.
The device stats handling is left to the caller.
Fixes: d254586c3453 ("can: rx-offload: Add support for HW fifo based irq offloading")
Reported-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/wan')
0 files changed, 0 insertions, 0 deletions