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]
Message-Id: <1214499251.10344.7.camel@Palanthas.Krynn>
Date:	Thu, 26 Jun 2008 18:54:09 +0200
From:	Raistlin <raistlin@...ux.it>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Michael Trimarchi <trimarchimichael@...oo.it>,
	PeterZijlstra <peterz@...radead.org>, "Daniel K." <dk@...no>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: divide error trying to set rt_period to zero

On Thu, 2008-06-26 at 15:39 +0200, Ingo Molnar wrote:
> > @@ -8501,6 +8501,9 @@ int sched_group_set_rt_period(struct task_group
> > *tg, long rt_period_us)
> >  	rt_period = (u64)rt_period_us * NSEC_PER_USEC;
> >  	rt_runtime = tg->rt_bandwidth.rt_runtime;
> >  
> > +	if (period == 0)
> > +		return -EINVAL;
> 
> this patch doesnt even build, because there's no "period" variable.
Ops! :-O

My fault, moving the 'if' back and forth from one function to another I
finally sent the wrong (and broken!) version of the patch... Very sorry
about it!

I know, I would have noticed just looking at the code... But I missed
it. :-(

Anyway, if still interested in, the following one build and work... I've
just tried it and I'm quite sure this time. :-P

Sorry again and Regards,
Dario Faggioli

Signed-off-by: Dario Faggioli <raistlin@...ux.it>
Signed-off-by: Michael Trimarchi <trimarchimichael@...oo.it>
---
diff --git a/kernel/sched.c b/kernel/sched.c
index 3aaa5c8..696758f 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -8501,6 +8501,9 @@ int sched_group_set_rt_period(struct task_group
*tg, long rt_period_us)
        rt_period = (u64)rt_period_us * NSEC_PER_USEC;
        rt_runtime = tg->rt_bandwidth.rt_runtime;
 
+       if (rt_period == 0)
+               return -EINVAL;
+
        return tg_set_bandwidth(tg, rt_period, rt_runtime);
 }

-- 
<<This happens because I choose it to happen!>>
(Raistlin Majere, DragonLance Chronicles -Dragons of Spring Drawning-)
----------------------------------------------------------------------
Dario Faggioli
GNU/Linux Registered User: #340657
Web: http://www.linux.it/~raistlin
Blog: http://blog.linux.it/raistlin
SIP Account: dario.faggioli@...proxy.wengo.fr or
             raistlin@...ga.net
Jabber Account: dario.faggioli@...ber.org/WengoPhone
GnuPG Key ID: 4DC83AC4
GnuPG Key Fingerprint: 2A78 AD5D B9CF A082 0836 08AD 9385 DA04 4DC8 3AC4

Download attachment "signature.asc" of type "application/pgp-signature" (198 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ