summaryrefslogtreecommitdiffstats
path: root/net/bridge/br_stp_timer.c
diff options
context:
space:
mode:
authorLars Westerhoff <lars.westerhoff@newtec.eu>2015-07-28 01:32:21 +0300
committerDavid S. Miller <davem@davemloft.net>2015-07-27 15:38:58 -0700
commit158cd4af8dedbda0d612d448c724c715d0dda649 (patch)
tree6bccf1b8da44cf06707413aed948e81032987c81 /net/bridge/br_stp_timer.c
parentc5c62f1bb0e1fc94ab77ec01e92ccab5cb249742 (diff)
downloadlinux-158cd4af8dedbda0d612d448c724c715d0dda649.tar.bz2
packet: missing dev_put() in packet_do_bind()
When binding a PF_PACKET socket, the use count of the bound interface is always increased with dev_hold in dev_get_by_{index,name}. However, when rebound with the same protocol and device as in the previous bind the use count of the interface was not decreased. Ultimately, this caused the deletion of the interface to fail with the following message: unregister_netdevice: waiting for dummy0 to become free. Usage count = 1 This patch moves the dev_put out of the conditional part that was only executed when either the protocol or device changed on a bind. Fixes: 902fefb82ef7 ('packet: improve socket create/bind latency in some cases') Signed-off-by: Lars Westerhoff <lars.westerhoff@newtec.eu> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_stp_timer.c')
0 files changed, 0 insertions, 0 deletions