net/packet: fix missing net_device reference release
authorDouglas Caetano dos Santos <douglascs@taghos.com.br>
Fri, 12 May 2017 18:19:15 +0000 (15:19 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Jun 2017 10:07:43 +0000 (12:07 +0200)
commitf79d3307c0356b63711d53d999158bdad667004b
tree104489bd1f3350e152dd792960aa87e14d0e01ee
parent5e7d9f0b3f729a64b99e58047f7bb0ff36acb759
net/packet: fix missing net_device reference release

[ Upstream commit d19b183cdc1fa3d70d6abe2a4c369e748cd7ebb8 ]

When using a TX ring buffer, if an error occurs processing a control
message (e.g. invalid message), the net_device reference is not
released.

Fixes c14ac9451c348 ("sock: enable timestamping using control messages")
Signed-off-by: Douglas Caetano dos Santos <douglascs@taghos.com.br>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/packet/af_packet.c