netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@gmail.com>
To: Minoru Usui <usui@mxm.nes.nec.co.jp>
Cc: tgraf@suug.ch, containers@lists.linux-foundation.org,
	netdev@vger.kernel.org, hadi@cyberus.ca
Subject: Re: [BUG] net_cls: Panic occured when net_cls subsystem use
Date: Mon, 8 Jun 2009 07:48:14 +0000	[thread overview]
Message-ID: <20090608074814.GA4972@ff.dom.local> (raw)
In-Reply-To: <20090608153951.dfa4b162.usui@mxm.nes.nec.co.jp>

On Mon, Jun 08, 2009 at 03:39:51PM +0900, Minoru Usui wrote:
> Hi Thomas
> 
> On Mon, 1 Jun 2009 18:12:01 +0900
> Minoru Usui <usui@mxm.nes.nec.co.jp> wrote:
> 
> > Hi Thomas
> > 
> > Original mail sent to netdev and containers before.
> > (http://www.spinics.net/lists/netdev/msg97745.html)
> > 
> > I have a question about how to use cls_cgroup.
> > 
> > On Thu, 21 May 2009 09:22:56 +0900
> > Minoru Usui <usui@mxm.nes.nec.co.jp> wrote:
> > 
> > > Hi
> > > 
> > > Unfortunately this is only panic report.
> > > 
> > > I used cgroup net_cls subsystem, then kernel panic occured.
> > > I attach panic message and kernel config in this mail's last paragraph.
> > > If my operation is wrong, could you tell me how to use net_cls and
> > > where the documentation is. 
> > > 
> > > # But I think panic is very bad even if my operation is wrong.
> > 
> > The cause of panic will fix soon. (Now I'll make a patch and will test it.)
> > 
> > I want to know how to use cls_cgroup correctly, so could you tell me how to use it if my operation is wrong. 
> > Now, I think I might have to specify 'handle' with tc command line, is this true?
> > But when I specified 'handle', I faced oops. X-P
> 
> I investigated this problem, and I found a bug in cls_cgroup_change() in cls_cgroup.c.
> cls_cgroup_change() expected tca[TCA_OPTIONS] was set from user space properly,
> but tc in iproute2-2.6.29-1 (which I used) didn't set it.
> 
> I saw the current source code of tc in git, I found the code for cls_cgroup in iproute2/tc/f_cgroup.c.
> It set tca[TCA_OPTIONS].
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git
> 
> # Unfortunately, current source coude of iproute2 couldn't compile, because it occured compile error. X-P
> # But this is another issue.
> 
> If we always use a newest iproute2 in git when we use cls_cgroup, we don't face this oops probably.
> But I think, kernel shouldn't panic regardless of use program's behaviour. 
> 

This patch looks OK to me, but I guess you should add some title (plus
"[PATCH]" in the subject), and a changelog (with lines width <= 80).

Cheers,
Jarek P.

> 
> Signed-off-by: Minoru Usui <usui@mxm.nes.nec.co.jp>
> 
> diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c
> index cc29b44..2ec0adc 100644
> --- a/net/sched/cls_cgroup.c
> +++ b/net/sched/cls_cgroup.c
> @@ -167,6 +167,9 @@ static int cls_cgroup_change(struct tcf_proto *tp, unsigned long base,
>  	struct tcf_exts e;
>  	int err;
>  
> +	if (!tca[TCA_OPTIONS])
> +		return -EINVAL;
> +
>  	if (head == NULL) {
>  		if (!handle)
>  			return -EINVAL;
> 
> 
> -- 
> Minoru Usui <usui@mxm.nes.nec.co.jp>

  reply	other threads:[~2009-06-08  7:48 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-21  0:22 [BUG] net_cls: Panic occured when net_cls subsystem use Minoru Usui
2009-05-29  5:18 ` Minoru Usui
2009-05-29  7:48   ` Jarek Poplawski
2009-05-29  8:03     ` Jarek Poplawski
2009-05-29 10:22       ` Jarek Poplawski
     [not found]         ` <20090529102232.GA6279-8HppEYmqbBCE+EvaaNYduQ@public.gmane.org>
2009-05-29 13:15           ` jamal
2009-05-29 13:46   ` jamal
2009-05-29 13:54     ` jamal
2009-05-29 22:59       ` Jarek Poplawski
     [not found]         ` <20090529225929.GD2753-dUp/P3zyUuaNj9Bq2fkWzw@public.gmane.org>
2009-05-30 11:17           ` Minoru Usui
2009-05-30 11:45             ` Jarek Poplawski
2009-05-30 11:56               ` jamal
     [not found]                 ` <1243684594.3966.89.camel-A00voryUPPswpNmlq7E/ZAC/G2K4zDHf@public.gmane.org>
2009-05-30 12:07                   ` Jarek Poplawski
     [not found]                     ` <20090530120750.GB3166-dUp/P3zyUuaNj9Bq2fkWzw@public.gmane.org>
2009-05-30 12:31                       ` jamal
2009-05-30 12:45                         ` Jarek Poplawski
2009-05-30 13:03                           ` jamal
2009-05-30 13:20                             ` Jarek Poplawski
2009-05-30 13:31                               ` jamal
2009-05-30 14:00                                 ` Jarek Poplawski
     [not found]                                   ` <20090530140006.GE3166-dUp/P3zyUuaNj9Bq2fkWzw@public.gmane.org>
2009-05-30 22:38                                     ` Minoru Usui
2009-05-30 23:34                                       ` jamal
2009-05-31  1:45                                         ` Minoru Usui
2009-05-31  8:15                                       ` Jarek Poplawski
2009-05-30 23:08                                   ` jamal
     [not found]                                     ` <1243724933.3966.158.camel-A00voryUPPswpNmlq7E/ZAC/G2K4zDHf@public.gmane.org>
2009-05-31  7:55                                       ` Jarek Poplawski
2009-05-31 13:17                                         ` jamal
2009-05-31 20:33                                           ` Jarek Poplawski
2009-05-30 22:22                             ` Minoru Usui
2009-05-30 23:13                               ` jamal
2009-05-31  8:07                                 ` Jarek Poplawski
2009-05-30 11:50           ` jamal
2009-05-31  8:12             ` Jarek Poplawski
2009-05-31 13:24               ` jamal
2009-05-31 13:43                 ` jamal
     [not found]                   ` <1243777427.3966.243.camel-A00voryUPPswpNmlq7E/ZAC/G2K4zDHf@public.gmane.org>
2009-05-31 21:12                     ` Jarek Poplawski
2009-05-31 19:55                 ` Jarek Poplawski
     [not found]                   ` <20090531195557.GA2777-dUp/P3zyUuaNj9Bq2fkWzw@public.gmane.org>
2009-05-31 23:40                     ` jamal
2009-06-01  6:06                       ` Jarek Poplawski
2009-06-01 13:03                         ` jamal
2009-06-01 13:34                           ` Minoru Usui
2009-06-01 20:49                           ` Jarek Poplawski
2009-06-01 21:55                             ` Jarek Poplawski
2009-06-01 22:06                             ` jamal
     [not found]                               ` <1243893963.3966.325.camel-A00voryUPPswpNmlq7E/ZAC/G2K4zDHf@public.gmane.org>
2009-06-02  6:26                                 ` Jarek Poplawski
2009-06-02 13:16                                   ` jamal
2009-06-02 21:10                                     ` Jarek Poplawski
2009-06-03 11:27                                       ` Jarek Poplawski
2009-06-10 11:58                                         ` jamal
2009-06-02  6:59                               ` Minoru Usui
2009-06-02  7:24                                 ` Jarek Poplawski
2009-06-02  8:29                                   ` Minoru Usui
     [not found]                                 ` <20090602155919.da89c08e.usui-vEbCzmPPqHe45+QrQBaojngSJqDPrsil@public.gmane.org>
2009-06-02 13:19                                   ` jamal
2009-06-04  4:41                                     ` Minoru Usui
2009-06-04  6:34                                       ` Jarek Poplawski
2009-06-04  8:37                                         ` Jarek Poplawski
2009-06-01  5:25     ` Minoru Usui
2009-06-01  9:12 ` Minoru Usui
2009-06-08  6:39   ` Minoru Usui
2009-06-08  7:48     ` Jarek Poplawski [this message]
2009-06-09  0:02       ` Minoru Usui

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=20090608074814.GA4972@ff.dom.local \
    --to=jarkao2@gmail.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=hadi@cyberus.ca \
    --cc=netdev@vger.kernel.org \
    --cc=tgraf@suug.ch \
    --cc=usui@mxm.nes.nec.co.jp \
    /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).