Search Linux Wireless

[PATCH] compat: fix a crash in the netlink backport

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Do not set the .doit wrapper if there is no .doit function.

Signed-off-by: Felix Fietkau <nbd@xxxxxxxxxxx>
---
--- a/compat/compat-2.6.37.c
+++ b/compat/compat-2.6.37.c
@@ -130,7 +130,8 @@ int compat_genl_register_family_with_ops
 		__copy(dumpit);
 		__copy(done);
 #undef __copy
-		ops[i].ops.doit = nl_doit_wrapper;
+		if (ops[i].doit)
+			ops[i].ops.doit = nl_doit_wrapper;
 		ret = genl_register_ops(&family->family, &ops[i].ops);
 		if (ret < 0)
 			goto error_ops;

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux