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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 5 Feb 2015 15:25:27 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Zefan Li <lizefan@...wei.com>
Cc:	Ingo Molnar <mingo@...nel.org>,
	Mike Galbraith <umgwanakikbuti@...il.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Stefan Bader <stefan.bader@...onical.com>
Subject: Re: [PATCH] sched, autogroup: Fix failure when writing to
 cpu.rt_runtime_us

On Thu, Feb 05, 2015 at 04:33:24PM +0800, Zefan Li wrote:
> This is how to reproduce the bug:
> 
> int main() {
>     struct sched_param param = {.sched_priority=1};
> 
>     if (fork() > 0)
>         exit(0);
> 
>     setsid();
> 
>     if (sched_setscheduler(0, SCHED_RR, &param) < 0){
>         perror("failed to sched_setscheduler()");
>         return -1;
>     }
> 
>     while(1)
>         ;
> }
> 
>   # ./test
>   # mount -t cgroup -o cpu xxx /cgroup
>   # cat /cgroup/cpu.rt_runtime_us
>   950000
>   # echo 940000 > /cgroup/cpu.rt_runtime_us
>   Device or Resource busy

That's -EBUSY, but you're changing an -EPERM condition. Neither your
patch nor explanation of the matter make sense.

--
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