On Fri, Jan 11, 2019 at 09:01:34AM +0100, Robin van der Gracht wrote: > For single frame transfers skb_pending is incremented but never > decremented. > > Signed-off-by: Robin van der Gracht <robin@xxxxxxxxxxx> Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx> > --- > net/can/j1939/socket.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/can/j1939/socket.c b/net/can/j1939/socket.c > index c1ee5fa7b6f7..a313077ca80a 100644 > --- a/net/can/j1939/socket.c > +++ b/net/can/j1939/socket.c > @@ -799,7 +799,7 @@ static int j1939_sk_sendmsg(struct socket *sock, struct msghdr *msg, > ret = j1939_sk_send_one(priv, sk, msg, size); > > j1939_priv_put(priv); > - if (ret < 0) > + if (ret < 0 || size <= 8) > j1939_sock_pending_del(&jsk->sk); > > dev_put(ndev); > -- > 2.19.1 > > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |