Files
i2som-imx-linux/include/linux
Cong Wang 3e2ab0ceef tun: call dev_get_valid_name() before register_netdevice()
[ Upstream commit 0ad646c81b ]

register_netdevice() could fail early when we have an invalid
dev name, in which case ->ndo_uninit() is not called. For tun
device, this is a problem because a timer etc. are already
initialized and it expects ->ndo_uninit() to clean them up.

We could move these initializations into a ->ndo_init() so
that register_netdevice() knows better, however this is still
complicated due to the logic in tun_detach().

Therefore, I choose to just call dev_get_valid_name() before
register_netdevice(), which is quicker and much easier to audit.
And for this specific case, it is already enough.

Fixes: 96442e4242 ("tuntap: choose the txq based on rxq")
Reported-by: Dmitry Alexeev <avekceeb@gmail.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-18 11:22:21 +01:00
..
2016-11-11 23:23:02 +01:00
2017-10-08 10:26:06 +02:00
2017-06-14 15:06:00 +02:00
2017-08-06 18:59:43 -07:00
2017-07-15 12:16:11 +02:00
2017-05-14 14:00:22 +02:00
2017-07-12 15:01:02 +02:00
2017-08-06 18:59:43 -07:00
2017-08-24 17:12:19 -07:00
2017-06-24 07:11:18 +02:00
2017-08-24 17:12:21 -07:00
2017-08-30 10:21:40 +02:00
2017-08-24 17:12:21 -07:00
2017-08-30 10:21:40 +02:00
2017-01-19 20:17:59 +01:00
2017-04-21 09:31:21 +02:00
2017-09-09 17:39:41 +02:00