From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from nbd.name ([88.198.39.176]:48091 "EHLO ds10.nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751304Ab0JKLqi (ORCPT ); Mon, 11 Oct 2010 07:46:38 -0400 Message-ID: <4CB2F91B.9000702@openwrt.org> Date: Mon, 11 Oct 2010 13:46:35 +0200 From: Felix Fietkau MIME-Version: 1.0 To: linux-wireless CC: "Luis R. Rodriguez" Subject: [PATCH] compat: fix a crash in the netlink backport Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-wireless-owner@vger.kernel.org List-ID: Do not set the .doit wrapper if there is no .doit function. Signed-off-by: Felix Fietkau --- --- 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;