All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@gmail.com>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, Franchoze Eric <franchoze@yandex.ru>
Subject: Re: [PATCH] sfq: add dummy bind/unbind handles
Date: Sat, 07 Aug 2010 01:17:07 +0200	[thread overview]
Message-ID: <4C5C97F3.3010604@gmail.com> (raw)
In-Reply-To: <20100806152313.43abc30b@nehalam>

Stephen Hemminger wrote, On 07.08.2010 00:23:

> Applying a filter to an SFQ qdisc would cause null dereference
> in tcf_bind_filter because although SFQ is classful it didn't
> have all the necessary equipment.
> 
> Better alternative to changing tcf_bind API is to just fix
> SFQ.  This should go to net-2.6 and stable.
> 

Hmm... FYI, actually I've sent already a similar patch to the
original bug report thread (except .unbind_tcf method which
doesn't matter for fixing this bug, so should be rather
implemented in a separate patch, if needed at all in this
case).

Jarek P.

> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> 
> --- a/net/sched/sch_sfq.c	2010-08-06 15:07:26.552820159 -0700
> +++ b/net/sched/sch_sfq.c	2010-08-06 15:14:24.458287452 -0700
> @@ -502,6 +502,10 @@ static unsigned long sfq_get(struct Qdis
>  	return 0;
>  }
>  
> +static void sfq_put(struct Qdisc *q, unsigned long cl)
> +{
> +}
> +
>  static struct tcf_proto **sfq_find_tcf(struct Qdisc *sch, unsigned long cl)
>  {
>  	struct sfq_sched_data *q = qdisc_priv(sch);
> @@ -511,6 +515,12 @@ static struct tcf_proto **sfq_find_tcf(s
>  	return &q->filter_list;
>  }
>  
> +static unsigned long sfq_bind_tcf(struct Qdisc *sch, unsigned long parent,
> +				  u32 cl)
> +{
> +	return 0;
> +}
> +
>  static int sfq_dump_class(struct Qdisc *sch, unsigned long cl,
>  			  struct sk_buff *skb, struct tcmsg *tcm)
>  {
> @@ -556,6 +566,8 @@ static void sfq_walk(struct Qdisc *sch, 
>  static const struct Qdisc_class_ops sfq_class_ops = {
>  	.get		=	sfq_get,
>  	.tcf_chain	=	sfq_find_tcf,
> +	.bind_tcf	=	sfq_bind_tcf,
> +	.unbind_tcf	=	sfq_put,
>  	.dump		=	sfq_dump_class,
>  	.dump_stats	=	sfq_dump_class_stats,
> 



  reply	other threads:[~2010-08-06 23:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100806193548.007978639@vyatta.com>
2010-08-06 19:35 ` [PATCH 1/9] net classifier: dont allow filters on semi-classful qdisc Stephen Hemminger
2010-08-06 21:24   ` Jarek Poplawski
2010-08-06 21:58     ` Stephen Hemminger
2010-08-06 22:23       ` [PATCH] sfq: add dummy bind/unbind handles Stephen Hemminger
2010-08-06 23:17         ` Jarek Poplawski [this message]
2010-08-08  5:45           ` David Miller
2010-08-08  7:04             ` Jarek Poplawski
2010-08-09 15:01               ` Franchoze Eric
2010-08-06 22:26       ` [PATCH 1/9] net classifier: dont allow filters on semi-classful qdisc Jarek Poplawski
2010-08-08  5:59         ` David Miller
2010-08-06 19:35 ` [PATCH 2/9] net classifier: deinline bind/unbind functions Stephen Hemminger
2010-08-06 19:35 ` [PATCH 3/9] u32 classifier: fix sparse warnings Stephen Hemminger
2010-08-06 19:35 ` [PATCH 4/9] netem: add locking around changes Stephen Hemminger
2010-08-06 19:35 ` [PATCH 5/9] netem: cleanup dump code Stephen Hemminger
2010-08-06 19:35 ` [PATCH 6/9] netem: distribution table changes Stephen Hemminger
2010-08-06 19:35 ` [PATCH 7/9] netem: dump distribution table Stephen Hemminger
2010-08-06 19:35 ` [PATCH 8/9] netem - revised correlated loss generator Stephen Hemminger
2010-08-06 19:35 ` [PATCH 9/9] netem: restore no jitter option Stephen Hemminger

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=4C5C97F3.3010604@gmail.com \
    --to=jarkao2@gmail.com \
    --cc=davem@davemloft.net \
    --cc=franchoze@yandex.ru \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.