From patchwork Thu Apr 8 11:24:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timo Teras X-Patchwork-Id: 49719 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 04FB7B7D2D for ; Thu, 8 Apr 2010 21:24:50 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758601Ab0DHLYp (ORCPT ); Thu, 8 Apr 2010 07:24:45 -0400 Received: from mail-ew0-f222.google.com ([209.85.219.222]:55092 "EHLO mail-ew0-f222.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758552Ab0DHLYo (ORCPT ); Thu, 8 Apr 2010 07:24:44 -0400 Received: by ewy22 with SMTP id 22so948403ewy.37 for ; Thu, 08 Apr 2010 04:24:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=O3kIo7dUf7gY7zFgkAfzNTtmf7hj8kdksiFLXLY88gA=; b=uWg4OpRDURCiyp7Mrx242+aPW/4GLnw+wrEm3IVZn9rCX8k2ESUzFn4lmLhti+but/ FEtVy3Q7PYOa+tv6psIXq7IctwH36mZslNsTMPrmwRs3CGlpPxDv1FFcjFT1E5ykqRs6 Hvty2drwnwfsJxTuuNhGtMYM9FgAM4ZXh0tbQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=f9cqb2EjMfMLb1nzQIoED7byCzdSTaqpCI/WpxbsttM4eUU6rcK8EHNj2O4eH436w8 BSvlYQA4o62vfDFUsStdwKONX9nopxxdhalbxxVjPbQwZWgDtV2rUcQRjK9cE2wWni35 uDtfLwtikPLWlikojPkVEXUobEJs+ozfStHts= Received: by 10.213.49.66 with SMTP id u2mr6090760ebf.52.1270725883428; Thu, 08 Apr 2010 04:24:43 -0700 (PDT) Received: from [10.26.34.1] (letku109.adsl.netsonic.fi [194.29.195.109]) by mx.google.com with ESMTPS id 15sm8621568ewy.12.2010.04.08.04.24.40 (version=SSLv3 cipher=RC4-MD5); Thu, 08 Apr 2010 04:24:41 -0700 (PDT) Message-ID: <4BBDBCF9.5060906@iki.fi> Date: Thu, 08 Apr 2010 14:24:41 +0300 From: =?ISO-8859-1?Q?Timo_Ter=E4s?= User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: Mark Brown CC: netdev@vger.kernel.org Subject: Re: Crashes in xfrm_lookup References: <20100408111441.GA14241@sirena.org.uk> In-Reply-To: <20100408111441.GA14241@sirena.org.uk> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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: --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 *);