[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100805.130755.57491167.davem@davemloft.net>
Date: Thu, 05 Aug 2010 13:07:55 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: franchoze@...dex.ru
Cc: netdev@...r.kernel.org
Subject: Re: null pointer at cls_api.c
From: Franchoze Eric <franchoze@...dex.ru>
Date: Thu, 05 Aug 2010 23:24:15 +0400
> @@ -255,6 +255,11 @@ replay:
> kfree(tp);
> goto errout;
> }
> +
> + if (!tp || !tp->ops) {
> + err = -ENOENT;
> + goto errout;
> + }
> tp->ops = tp_ops;
> tp->protocol = protocol;
> tp->prio = nprio ? : TC_H_MAJ(tcf_auto_prio(*back));
>
This patch makes no sense.
We check for "tp" being non-NULL in the code block about the if() block you're
adding these checks to.
And tp->ops of course might be NULL here, and that's perfectly fine,
as we're about to assign "tp_ops" to it.
Looking at your backtrace I think perhaps your crash is elsewhere.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists