All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizf.kern@gmail.com>
To: Herbert Xu <herbert@gondor.hengli.com.au>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	Randy Dunlap <randy.dunlap@oracle.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Jamal Hadi Salim <hadi@cyberus.ca>, Thomas Graf <tgraf@suug.ch>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	netdev <netdev@vger.kernel.org>, Ben Blum <bblum@andrew.cmu.edu>
Subject: Re: Linux 2.6.37-rc1 (net/sched: cls_cgroup)
Date: Thu, 04 Nov 2010 09:46:07 +0800	[thread overview]
Message-ID: <4CD2105F.6090900@gmail.com> (raw)
In-Reply-To: <20101103233105.GA26124@gondor.apana.org.au>

>> commits 8e039d84b323c450 
>> (cgroups: net_cls as module)
>>
>> followed by commit f845172531f
>> (cls_cgroup: Store classid in struct sock)
> 
> Indeed, it looks like the tree I worked on didn't have the first
> patch applied for some reason.
> 

The first patch was merged in .34, and the second one .35, and
from the changelog and the diff, seems you did know cls_cgroup
can be a module. ;)

> Anyway, this patch should fix the problem.  Thanks Eric!
> 
> cls_cgroup: Fix crash on module unload
> 
> Somewhere along the lines net_cls_subsys_id became a macro when
> cls_cgroup is built as a module.  Not only did it make cls_cgroup
> completely useless, it also causes it to crash on module unload.
> 
> This patch fixes this by removing that macro.
> 
> Thanks to Eric Dumazet for diagnosing this problem.
> 
> Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
> 

Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>

> diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c
> index 37dff78..d49c40f 100644
> --- a/net/sched/cls_cgroup.c
> +++ b/net/sched/cls_cgroup.c
> @@ -34,8 +34,6 @@ struct cgroup_subsys net_cls_subsys = {
>  	.populate	= cgrp_populate,
>  #ifdef CONFIG_NET_CLS_CGROUP
>  	.subsys_id	= net_cls_subsys_id,
> -#else
> -#define net_cls_subsys_id net_cls_subsys.subsys_id
>  #endif
>  	.module		= THIS_MODULE,
>  };
> 
> Cheers,

WARNING: multiple messages have this Message-ID (diff)
From: Li Zefan <lizf.kern@gmail.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	Randy Dunlap <randy.dunlap@oracle.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Jamal Hadi Salim <hadi@cyberus.ca>, Thomas Graf <tgraf@suug.ch>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	netdev <netdev@vger.kernel.org>, Ben Blum <bblum@andrew.cmu.edu>
Subject: Re: Linux 2.6.37-rc1 (net/sched: cls_cgroup)
Date: Thu, 04 Nov 2010 09:46:07 +0800	[thread overview]
Message-ID: <4CD2105F.6090900@gmail.com> (raw)
In-Reply-To: <20101103233105.GA26124@gondor.apana.org.au>

>> commits 8e039d84b323c450 
>> (cgroups: net_cls as module)
>>
>> followed by commit f845172531f
>> (cls_cgroup: Store classid in struct sock)
> 
> Indeed, it looks like the tree I worked on didn't have the first
> patch applied for some reason.
> 

The first patch was merged in .34, and the second one .35, and
from the changelog and the diff, seems you did know cls_cgroup
can be a module. ;)

> Anyway, this patch should fix the problem.  Thanks Eric!
> 
> cls_cgroup: Fix crash on module unload
> 
> Somewhere along the lines net_cls_subsys_id became a macro when
> cls_cgroup is built as a module.  Not only did it make cls_cgroup
> completely useless, it also causes it to crash on module unload.
> 
> This patch fixes this by removing that macro.
> 
> Thanks to Eric Dumazet for diagnosing this problem.
> 
> Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
> 

Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>

> diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c
> index 37dff78..d49c40f 100644
> --- a/net/sched/cls_cgroup.c
> +++ b/net/sched/cls_cgroup.c
> @@ -34,8 +34,6 @@ struct cgroup_subsys net_cls_subsys = {
>  	.populate	= cgrp_populate,
>  #ifdef CONFIG_NET_CLS_CGROUP
>  	.subsys_id	= net_cls_subsys_id,
> -#else
> -#define net_cls_subsys_id net_cls_subsys.subsys_id
>  #endif
>  	.module		= THIS_MODULE,
>  };
> 
> Cheers,

  reply	other threads:[~2010-11-04  1:46 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-01 12:07 Linux 2.6.37-rc1 Linus Torvalds
2010-11-01 15:37 ` Thomas Gleixner
2010-11-01 15:47   ` Nick Bowler
2010-11-01 15:52     ` Ryusuke Konishi
2010-11-01 16:07       ` Linus Torvalds
2010-11-02 18:51 ` Linux 2.6.37-rc1 (acpi_video) Randy Dunlap
2010-11-03 21:08 ` Linux 2.6.37-rc1 (cciss: remove_proc_entry warning) Randy Dunlap
2010-11-03 21:15 ` Linux 2.6.37-rc1 (pcrypt fault) Randy Dunlap
2010-11-03 21:15   ` Randy Dunlap
2010-11-10 11:21   ` Steffen Klassert
2010-11-10 18:11     ` Randy Dunlap
2010-11-03 21:21 ` Linux 2.6.37-rc1 (net/sched: cls_cgroup) Randy Dunlap
2010-11-03 21:21   ` Randy Dunlap
2010-11-03 22:01   ` Eric Dumazet
2010-11-03 22:01     ` Eric Dumazet
2010-11-03 22:19     ` Li Zefan
2010-11-03 22:19       ` Li Zefan
2010-11-03 22:31       ` Li Zefan
2010-11-03 22:31         ` Li Zefan
2010-11-03 23:31     ` Herbert Xu
2010-11-03 23:31       ` Herbert Xu
2010-11-04  1:46       ` Li Zefan [this message]
2010-11-04  1:46         ` Li Zefan
2010-11-04  1:56       ` David Miller
2010-11-04  1:56         ` David Miller
2010-11-04 15:56       ` Randy Dunlap
2010-11-03 23:16 ` Linux 2.6.37-rc1 (floppy module load: no device found) Randy Dunlap
2010-11-05 22:10   ` Linus Torvalds
2010-11-05 22:12     ` David Miller
2010-11-05 23:03     ` Randy Dunlap
2010-11-05 23:36       ` Linus Torvalds
2010-11-06  0:33         ` Randy Dunlap
2010-11-06 12:16         ` Vivek Goyal
2010-11-06 14:52           ` Linus Torvalds
2010-11-03 23:18 ` Linux 2.6.37-rc1 (libipw remove_proc_entry warning) Randy Dunlap
2010-11-05 22:24   ` Linus Torvalds
2010-11-05 23:06     ` Randy Dunlap
2010-11-05 23:38       ` Linus Torvalds
2010-11-08 21:33         ` John W. Linville
2010-11-03 23:20 ` Linux 2.6.37-rc1 (scsi_debug: list corruption) Randy Dunlap
2010-11-03 23:20   ` Randy Dunlap
2010-11-04  2:25   ` Xiaotian Feng
2010-11-04  2:25     ` Xiaotian Feng
2010-11-04 16:12     ` Randy Dunlap

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=4CD2105F.6090900@gmail.com \
    --to=lizf.kern@gmail.com \
    --cc=bblum@andrew.cmu.edu \
    --cc=eric.dumazet@gmail.com \
    --cc=hadi@cyberus.ca \
    --cc=herbert@gondor.hengli.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    --cc=tgraf@suug.ch \
    --cc=torvalds@linux-foundation.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 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.