Netdev List
 help / color / mirror / Atom feed
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: Florent Fourcot <florent.fourcot@enst-bretagne.fr>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH RFC] ipv6: enable IPV6_FLOWLABEL_MGR for getsockopt
Date: Mon, 4 Nov 2013 18:46:49 +0100	[thread overview]
Message-ID: <20131104174649.GC8832@order.stressinduktion.org> (raw)
In-Reply-To: <5277D4AD.10308@enst-bretagne.fr>

On Mon, Nov 04, 2013 at 06:09:01PM +0100, Florent Fourcot wrote:
> 
> > We should take ip6_fl_lock here, otherwise expires extraction races with
> > the garbage collector (which can update it). There seem to be some other
> > unsafe places, e.g. fl6_renew.
> > 
> 
> I will fix it, and for fl6_renew too.

Thanks!

> >> +			freq->flr_label = sfl->fl->label;
> >> +			freq->flr_dst = sfl->fl->dst;
> >> +			freq->flr_share = sfl->fl->share;
> >> +			freq->flr_expires = (sfl->fl->expires - jiffies) / HZ;
> >> +			freq->flr_linger = sfl->fl->linger / HZ;
> >> +
> >> +			rcu_read_unlock_bh();
> >> +			return 0;
> >> +		}
> >> +	}
> >> +	rcu_read_unlock_bh();
> >> +
> >> +	return 0;
> > 
> > Maybe return -EINVAL for not found?
> > 
> 
> I don't like -EINVAL for this case, since the user can not know if there
> are no label or if the request has bad parameters. Could -ENOMSG be OK?

-ENOMSG or we already return -ENOENT from the same setsockopt. I would go with
ENOENT.

Greetings,

  Hannes

      reply	other threads:[~2013-11-04 17:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-02 16:58 [PATCH RFC] ipv6: enable IPV6_FLOWLABEL_MGR for getsockopt Florent Fourcot
2013-11-04  0:04 ` Hannes Frederic Sowa
2013-11-04 17:09   ` Florent Fourcot
2013-11-04 17:46     ` Hannes Frederic Sowa [this message]

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=20131104174649.GC8832@order.stressinduktion.org \
    --to=hannes@stressinduktion.org \
    --cc=florent.fourcot@enst-bretagne.fr \
    --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