All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Timo Teräs" <timo.teras@iki.fi>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: netdev@vger.kernel.org
Subject: Re: Crashes in xfrm_lookup
Date: Thu, 08 Apr 2010 14:24:41 +0300	[thread overview]
Message-ID: <4BBDBCF9.5060906@iki.fi> (raw)
In-Reply-To: <20100408111441.GA14241@sirena.org.uk>

Mark Brown wrote:
> With -next as of today I'm experiencing crashes in the xfrm_lookup code
> when attempting to boot from an NFS root on a SMDK6410 (an ARM based
> development board).  I'm currently investigating what's gone wrong, but
> thought it was better to report early in case it's obvious to someone
> familiar with the code or there's a fix already.

Probably the same as http://marc.info/?t=127071006600005&r=1&w=2

Happens because CONFIG_XFRM_SUB_POLICY is not enabled, and one of
the helper functions I used did unexpected things in that case.

Try the following:

diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 625dd61..cccb049 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -735,19 +735,12 @@ static inline void xfrm_pol_put(struct xfrm_policy *policy)
 		xfrm_policy_destroy(policy);
 }
 
-#ifdef CONFIG_XFRM_SUB_POLICY
 static inline void xfrm_pols_put(struct xfrm_policy **pols, int npols)
 {
 	int i;
 	for (i = npols - 1; i >= 0; --i)
 		xfrm_pol_put(pols[i]);
 }
-#else
-static inline void xfrm_pols_put(struct xfrm_policy **pols, int npols)
-{
-	xfrm_pol_put(pols[0]);
-}
-#endif
 
 extern void __xfrm_state_destroy(struct xfrm_state *);
 


  reply	other threads:[~2010-04-08 11:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-08 11:14 Crashes in xfrm_lookup Mark Brown
2010-04-08 11:24 ` Timo Teräs [this message]
2010-04-08 11:31   ` Mark Brown
2010-04-08 18:28   ` David Miller
2010-04-09  8:09   ` Herbert Xu
2010-04-09  8:11     ` Timo Teräs
2010-04-09  8:22       ` Herbert Xu
2010-04-09  8:30         ` Timo Teräs
2010-04-09  8:39           ` Herbert Xu
2010-04-09  8:47             ` Timo Teräs
2010-04-09  9:25               ` Herbert Xu

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=4BBDBCF9.5060906@iki.fi \
    --to=timo.teras@iki.fi \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.