Thread (1 message) 1 message, 1 author, 2016-03-16

Re: [PATCH 4.4 24/50] wext: fix message delay/ordering

From: Ben Hutchings <hidden>
Date: 2016-03-16 12:50:05

On Mon, 2016-03-14 at 10:50 -0700, Greg Kroah-Hartman wrote:
[
4.4-stable review patch.  If anyone has any objections, please let me know.
I don't have any objections, so I dropped Greg and stable from the
recipients.

[...]
quoted hunk
--- a/net/wireless/wext-core.c
+++ b/net/wireless/wext-core.c
[...]
 static int __init wireless_nlevent_init(void)
 {
-	return register_pernet_subsys(&wext_pernet_ops);
+	int err = register_pernet_subsys(&wext_pernet_ops);
+
+	if (err)
+		return err;
+
+	return register_netdevice_notifier(&wext_netdev_notifier);
 }
[...]

In practice this is safe as register_netdevice_notifier() will only
return an error if your notifier does so, which it does not.  But it
seem like a good idea to future-proof it by adding a check for failure
and calling unregister_pernet_subsys() in that case.

Ben.
l
-- 
Ben Hutchings
If you seem to know what you are doing, you'll be given more to do.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help