]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
sock: free skb in skb_complete_tx_timestamp on error
authorWillem de Bruijn <willemb@google.com>
Wed, 13 Dec 2017 19:41:06 +0000 (14:41 -0500)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 13 Mar 2018 10:29:55 +0000 (11:29 +0100)
commitdcfc56f3fdd75d3f26044a8eb7636b400fc3f583
tree7c36c64ed17104b21a1291d7bf32999fe5ccafef
parent7ddf18e5d4a3c8be38abc5941decc0a78b25e915
sock: free skb in skb_complete_tx_timestamp on error

BugLink: http://bugs.launchpad.net/bugs/1745069
[ Upstream commit 35b99dffc3f710cafceee6c8c6ac6a98eb2cb4bf ]

skb_complete_tx_timestamp must ingest the skb it is passed. Call
kfree_skb if the skb cannot be enqueued.

Fixes: b245be1f4db1 ("net-timestamp: no-payload only sysctl")
Fixes: 9ac25fc06375 ("net: fix socket refcounting in skb_complete_tx_timestamp()")
Reported-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
net/core/skbuff.c