From: James Morris <jmorris@namei.org>
To: Joy Latten <latten@austin.ibm.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: PATCH[1/1]: kernel panic when large security contexts in ACQUIRE
Date: Fri, 13 Apr 2007 13:51:24 -0400 (EDT) [thread overview]
Message-ID: <Line.LNX.4.64.0704131351080.20794@d.namei> (raw)
In-Reply-To: <200704131504.l3DF4lYF031824@faith.austin.ibm.com>
On Fri, 13 Apr 2007, Joy Latten wrote:
>
> Signed-off-by: Joy Latten <latten@austin.ibm.com>
Acked-by: James Morris <jmorris@namei.org>
>
>
> diff -urpN linux-2.6.20/net/xfrm/xfrm_user.c linux-2.6.20.patch/net/xfrm/xfrm_user.c
> --- linux-2.6.20/net/xfrm/xfrm_user.c 2007-04-12 15:12:27.000000000 -0500
> +++ linux-2.6.20.patch/net/xfrm/xfrm_user.c 2007-04-13 09:32:35.000000000 -0500
> @@ -272,9 +272,8 @@ static int attach_encap_tmpl(struct xfrm
> }
>
>
> -static inline int xfrm_user_sec_ctx_size(struct xfrm_policy *xp)
> +static inline int xfrm_user_sec_ctx_size(struct xfrm_sec_ctx *xfrm_ctx)
> {
> - struct xfrm_sec_ctx *xfrm_ctx = xp->security;
> int len = 0;
>
> if (xfrm_ctx) {
> @@ -2170,7 +2169,7 @@ static int xfrm_send_acquire(struct xfrm
>
> len = RTA_SPACE(sizeof(struct xfrm_user_tmpl) * xp->xfrm_nr);
> len += NLMSG_SPACE(sizeof(struct xfrm_user_acquire));
> - len += RTA_SPACE(xfrm_user_sec_ctx_size(xp));
> + len += RTA_SPACE(xfrm_user_sec_ctx_size(x->security));
> #ifdef CONFIG_XFRM_SUB_POLICY
> len += RTA_SPACE(sizeof(struct xfrm_userpolicy_type));
> #endif
> @@ -2280,7 +2279,7 @@ static int xfrm_exp_policy_notify(struct
>
> len = RTA_SPACE(sizeof(struct xfrm_user_tmpl) * xp->xfrm_nr);
> len += NLMSG_SPACE(sizeof(struct xfrm_user_polexpire));
> - len += RTA_SPACE(xfrm_user_sec_ctx_size(xp));
> + len += RTA_SPACE(xfrm_user_sec_ctx_size(xp->security));
> #ifdef CONFIG_XFRM_SUB_POLICY
> len += RTA_SPACE(sizeof(struct xfrm_userpolicy_type));
> #endif
>
--
James Morris
<jmorris@namei.org>
next prev parent reply other threads:[~2007-04-13 17:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-13 15:04 PATCH[1/1]: kernel panic when large security contexts in ACQUIRE Joy Latten
2007-04-13 17:51 ` James Morris [this message]
2007-04-13 23:14 ` David Miller
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=Line.LNX.4.64.0704131351080.20794@d.namei \
--to=jmorris@namei.org \
--cc=davem@davemloft.net \
--cc=latten@austin.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox