lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6599ad830803170126g3f886cb6l94462c52dcf0a03a@mail.gmail.com>
Date:	Mon, 17 Mar 2008 16:26:57 +0800
From:	"Paul Menage" <menage@...gle.com>
To:	"Li Zefan" <lizf@...fujitsu.com>
Cc:	"Andrew Morton" <akpm@...ux-foundation.org>,
	"Balbir Singh" <balbir@...ux.vnet.ibm.com>,
	LKML <linux-kernel@...r.kernel.org>,
	"Linux Containers" <containers@...ts.osdl.org>
Subject: Re: [PATCH -mm] cgroup: fix boot option parsing

On Mon, Mar 17, 2008 at 4:24 PM, Li Zefan <lizf@...fujitsu.com> wrote:
> When boot with 'cgroup_disable=cpuacct', it turns out subsystem
>  'cpu' is disabled.
>
>  When Balbir posted the patch to add cgroup boot option support,
>  Paul M noticed this problem, but the patch was accepted without
>  fixing it.
>
>  Signed-off-by: Li Zefan <lizf@...fujitsu.com>

Acked-by: Paul Menage <menage@...gle.com>

>  ---
>   kernel/cgroup.c |   15 ++++++---------
>   1 files changed, 6 insertions(+), 9 deletions(-)
>
>  diff --git a/kernel/cgroup.c b/kernel/cgroup.c
>  index e8e8ec4..54c28ea 100644
>  --- a/kernel/cgroup.c
>  +++ b/kernel/cgroup.c
>  @@ -3062,25 +3062,22 @@ static void cgroup_release_agent(struct work_struct *work)
>   static int __init cgroup_disable(char *str)
>   {
>         int i;
>  +       char *token;
>  +
>  +       while ((token = strsep(&str, ",")) != NULL) {
>  +               if (!*token)
>  +                       continue;
>
>  -       while (*str) {
>                 for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
>                         struct cgroup_subsys *ss = subsys[i];
>
>  -                       if (!strncmp(str, ss->name, strlen(ss->name))) {
>  +                       if (!strcmp(token, ss->name)) {
>                                 ss->disabled = 1;
>                                 printk(KERN_INFO "Disabling %s control group"
>                                         " subsystem\n", ss->name);
>                                 break;
>                         }
>                 }
>  -               /*
>  -                * Find the next option if any
>  -                */
>  -               while (*str && (*str != ','))
>  -                       str++;
>  -               if (*str == ',')
>  -                       str++;
>         }
>         return 1;
>   }
>  --
>  1.5.4.rc3
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ