linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: linux-wireless <linux-wireless@vger.kernel.org>
Cc: "Luis R. Rodriguez" <lrodriguez@atheros.com>
Subject: [PATCH] compat: fix a crash in the netlink backport
Date: Mon, 11 Oct 2010 13:46:35 +0200	[thread overview]
Message-ID: <4CB2F91B.9000702@openwrt.org> (raw)

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

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
--- 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;


             reply	other threads:[~2010-10-11 11:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-11 11:46 Felix Fietkau [this message]
2010-10-11 17:42 ` [PATCH] compat: fix a crash in the netlink backport Luis R. Rodriguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CB2F91B.9000702@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lrodriguez@atheros.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).