public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: ebiederm@xmission•com (Eric W. Biederman)
To: David Miller <davem@davemloft•net>
Cc: <netdev@vger•kernel.org>, Jamal Hadi Salim <hadi@cyberus•ca>
Subject: Re: [PATCH] xfrm: Don't pass current->pid to functions expecting a netlink portid
Date: Sat, 08 Sep 2012 00:03:19 -0700	[thread overview]
Message-ID: <871uidj8so.fsf@xmission.com> (raw)
In-Reply-To: <87a9x1j9qh.fsf@xmission.com> (Eric W. Biederman's message of "Fri, 07 Sep 2012 23:43:02 -0700")


Ignore this patch.  The issue is real this fix is wrong.

> diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
> index 4801c81..d7bfd27 100644
> --- a/net/xfrm/xfrm_user.c
> +++ b/net/xfrm/xfrm_user.c
> @@ -1930,7 +1930,7 @@ static int xfrm_add_pol_expire(struct sk_buff *skb, struct nlmsghdr *nlh,
>  		// reset the timers here?
>  		WARN(1, "Dont know what to do with soft policy expire\n");
>  	}
> -	km_policy_expired(xp, p->dir, up->hard, current->pid);
> +	km_policy_expired(xp, p->dir, up->hard, 0);
>  
>  out:
>  	xfrm_pol_put(xp);
> @@ -1958,7 +1958,7 @@ static int xfrm_add_sa_expire(struct sk_buff *skb, struct nlmsghdr *nlh,
>  	err = -EINVAL;
>  	if (x->km.state != XFRM_STATE_VALID)
>  		goto out;
> -	km_state_expired(x, ue->hard, current->pid);
> +	km_state_expired(x, ue->hard, 0);
>  
>  	if (ue->hard) {
>  		uid_t loginuid = audit_get_loginuid(current);

  reply	other threads:[~2012-09-08  7:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-08  6:43 [PATCH] xfrm: Don't pass current->pid to functions expecting a netlink portid Eric W. Biederman
2012-09-08  7:03 ` Eric W. Biederman [this message]
2012-09-08  7:17   ` [PATCH] xfrm: Report user triggered expirations against the users socket Eric W. Biederman
2012-09-08 11:48     ` Jamal Hadi Salim
2012-09-10 19:34       ` 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=871uidj8so.fsf@xmission.com \
    --to=ebiederm@xmission$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=hadi@cyberus$(echo .)ca \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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