Files
i2som-imx-linux/include/linux
Cong Wang 4b27fe34a2 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:11:05 +01:00
..
2016-08-20 18:09:25 +02:00
2017-10-08 10:14:18 +02:00
2017-06-14 13:16:23 +02:00
2017-08-06 19:19:42 -07:00
2017-07-21 07:44:58 +02:00
2017-05-14 13:32:59 +02:00
2017-07-15 11:57:44 +02:00
2017-06-14 13:16:24 +02:00
2017-08-06 19:19:42 -07:00
2016-10-28 03:01:30 -04:00
2017-06-26 07:13:11 +02:00
2016-12-08 07:15:24 +01:00
2017-08-24 17:02:36 -07:00
2017-08-24 17:02:36 -07:00
2016-09-30 10:18:37 +02:00
2016-10-28 03:01:30 -04:00
2017-09-13 14:09:45 -07:00