netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Moore <pmoore@redhat.com>
To: jasowang@redhat.com
Cc: netdev@vger.kernel.org, linux-security-module@vger.kernel.org,
	selinux@tycho.nsa.gov
Subject: Re: [RFC PATCH 1/2] tun: correctly report an error in tun_flow_init()
Date: Wed, 05 Dec 2012 11:02:04 -0500	[thread overview]
Message-ID: <2057175.PIsargdSHu@sifl> (raw)
In-Reply-To: <20121129220629.30020.99947.stgit@sifl>

On Thursday, November 29, 2012 05:06:29 PM Paul Moore wrote:
> On error, the error code from tun_flow_init() is lost inside
> tun_set_iff(), this patch fixes this by assigning the tun_flow_init()
> error code to the "err" variable which is returned by
> the tun_flow_init() function on error.
> 
> Signed-off-by: Paul Moore <pmoore@redhat.com>

Jason, we've had some good discussion around patch 2/2 but nothing on this 
fix; can I assume you are okay with this patch?  If so I think we should go 
ahead and apply this ...

> ---
>  drivers/net/tun.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/tun.c b/drivers/net/tun.c
> index 607a3a5..877ffe2 100644
> --- a/drivers/net/tun.c
> +++ b/drivers/net/tun.c
> @@ -1605,7 +1605,8 @@ static int tun_set_iff(struct net *net, struct file
> *file, struct ifreq *ifr)
> 
>  		tun_net_init(dev);
> 
> -		if (tun_flow_init(tun))
> +		err = tun_flow_init(tun);
> +		if (err < 0)
>  			goto err_free_dev;
> 
>  		dev->hw_features = NETIF_F_SG | NETIF_F_FRAGLIST |
-- 
paul moore
security and virtualization @ redhat


  reply	other threads:[~2012-12-05 16:02 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-29 22:06 [RFC PATCH 0/2] Fix some multiqueue TUN problems Paul Moore
2012-11-29 22:06 ` [RFC PATCH 1/2] tun: correctly report an error in tun_flow_init() Paul Moore
2012-12-05 16:02   ` Paul Moore [this message]
2012-12-06  3:35     ` Jason Wang
2012-11-29 22:06 ` [RFC PATCH 2/2] tun: fix LSM/SELinux labeling of tun/tap devices Paul Moore
2012-12-03 10:15   ` Jason Wang
2012-12-03 16:22     ` Paul Moore
2012-12-04 13:24       ` Jason Wang
2012-12-04 15:24         ` Michael S. Tsirkin
2012-12-05  6:17           ` Jason Wang
2012-12-05 11:43             ` Michael S. Tsirkin
2012-12-05 13:45               ` Jason Wang
2012-12-04 16:18         ` Paul Moore
2012-12-04 17:36           ` Michael S. Tsirkin
2012-12-04 18:17             ` Paul Moore
2012-12-05  6:19               ` Jason Wang
2012-12-05 11:44                 ` Michael S. Tsirkin
2012-12-05 14:01                   ` Jason Wang
2012-12-05 16:00                     ` Paul Moore
2012-12-05  5:44           ` Jason Wang

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=2057175.PIsargdSHu@sifl \
    --to=pmoore@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=linux-security-module@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=selinux@tycho.nsa.gov \
    /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;
as well as URLs for NNTP newsgroup(s).