All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Rakib Mullick <rakib.mullick@gmail.com>,
	Linux-kernel Mailing List <linux-kernel@vger.kernel.org>,
	mingo@elte.hu, Balbir Singh <balbir@linux.vnet.ibm.com>
Subject: Re: [PATCH] mm: Fix section mismatch in memcontrol.c
Date: Wed, 14 Jan 2009 13:14:54 +0800	[thread overview]
Message-ID: <496D74CE.2070308@cn.fujitsu.com> (raw)
In-Reply-To: <20090114140010.3649cd2e.kamezawa.hiroyu@jp.fujitsu.com>

KAMEZAWA Hiroyuki wrote:
> On Wed, 14 Jan 2009 10:43:24 +0600
> "Rakib Mullick" <rakib.mullick@gmail.com> wrote:
> 
>> Sure. You can carryout your other jobs. Here is the patch.
>> Thanks for your help guys.
>>
> Thank you. I confirmed this fixes mismatch.
> 
> Could you send this with your Signed-off-by, again ?
> 
> you got my Ack.
> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> 

No... This patch is still not correct..

It's mem_cgroup_create() but not enable_swap_cgroup() that needs
to be marked as __init_refok.

Here is the correct one:

===============

From: Li Zefan <lizf@cn.fujitsu.com>
Date: Wed, 14 Jan 2009 13:07:31 +0800
Subject: [PATCH] memcg: fix section mismatch

At system boot when creating the top cgroup, mem_cgroup_create() calls
enable_swap_cgroup() which is marked as __init, so mark mem_cgroup_create()
as __init_refok to avoid false section mismatch warning.

Reported-by: Rakib Mullick <rakib.mullick@gmail.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 mm/memcontrol.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index e2996b8..a2c929f 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -2181,7 +2181,7 @@ static void __init enable_swap_cgroup(void)
 }
 #endif
 
-static struct cgroup_subsys_state *
+static struct cgroup_subsys_state * __init_refok
 mem_cgroup_create(struct cgroup_subsys *ss, struct cgroup *cont)
 {
 	struct mem_cgroup *mem, *parent;
-- 
1.5.4.rc3

  parent reply	other threads:[~2009-01-14  5:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-13  5:39 [PATCH] mm: Fix section mismatch in memcontrol.c Rakib Mullick
2009-01-13  5:49 ` Li Zefan
2009-01-13  6:13   ` KAMEZAWA Hiroyuki
2009-01-14  4:43     ` Rakib Mullick
2009-01-14  5:00       ` KAMEZAWA Hiroyuki
2009-01-14  5:05         ` Rakib Mullick
2009-01-14  5:14         ` Li Zefan [this message]
2009-01-14  6:49           ` KAMEZAWA Hiroyuki
  -- strict thread matches above, loose matches on Subject: below --
2009-01-13  5:39 Rakib Mullick

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=496D74CE.2070308@cn.fujitsu.com \
    --to=lizf@cn.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rakib.mullick@gmail.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.