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: <20080117111401.354f8949.randy.dunlap@oracle.com>
Date:	Thu, 17 Jan 2008 11:14:01 -0800
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, mingo@...e.hu
Subject: Re: 2.6.24-rc8-mm1 (BUG: sched_rt)

On Thu, 17 Jan 2008 18:11:04 +0100 Peter Zijlstra wrote:

> 
> On Thu, 2008-01-17 at 08:48 -0800, Randy Dunlap wrote:
> > On Thu, 17 Jan 2008 02:35:14 -0800 Andrew Morton wrote:
> > 
> > > 
> > > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.24-rc8/2.6.24-rc8-mm1/
> > 
> > Booting on x86_64 SMP gives me:
> > 
> > ------------[ cut here ]------------
> > kernel BUG at kernel/sched_rt.c:228!
> > invalid opcode: 0000 [1] SMP
> > last sysfs file: /sys/devices/pci0000:40/0000:40:0c.0/0000:41:00.0/0000:42:08.0/class
> > CPU 2
> > Modules linked in: parport_pc lp parport tg3 cciss ehci_hcd ohci_hcd uhci_hcd
> > Pid: 12738, comm: 5-1.test Not tainted 2.6.24-rc8-mm1 #1
> > RIP: 0010:[<ffffffff8023077b>]  [<ffffffff8023077b>] update_curr_rt+0x27/0x87
> > RSP: 0018:ffff8101e6805e38  EFLAGS: 00010093
> > RAX: 0000000000000000 RBX: ffff81027f8591e0 RCX: ffff81000100fb80
> > RDX: 0000000000000000 RSI: ffff81026eb8b1e0 RDI: ffff810001014980
> > RBP: ffff8101e6805e48 R08: ffffffff8067d960 R09: 00000000000031c1
> > R10: 0000000000000000 R11: 0000000000000246 R12: ffff81026eb8b1e0
> > R13: ffff810001014980 R14: 0000000000000001 R15: 00000000ffffffff
> > FS:  0000000041a07940(0063) GS:ffff81027f80d700(0000) knlGS:0000000000000000
> > CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> > CR2: 000000338b00c2d0 CR3: 0000000254169000 CR4: 00000000000006e0
> > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> > Process 5-1.test (pid: 12738, threadinfo ffff8101e6804000, task ffff81026c8de8f0)
> > Stack:  0000000000000000 ffff81026eb8b348 ffff8101e6805e78 ffffffff80231c9b
> >  0000000000000000 ffff81026eb8b1e0 ffff810001014980 ffff81026eb8b1e0
> >  ffff8101e6805e98 ffffffff8022f1bb ffff8101e6805ea8 ffff810001014980
> > Call Trace:
> >  [<ffffffff80231c9b>] dequeue_task_rt+0x1f/0x5e
> >  [<ffffffff8022f1bb>] dequeue_task+0x13/0x1e
> >  [<ffffffff8022f1e8>] deactivate_task+0x22/0x2a
> >  [<ffffffff802343f9>] sched_setscheduler+0x22e/0x32f
> >  [<ffffffff8023486a>] do_sched_setscheduler+0x5f/0x6e
> >  [<ffffffff802348a0>] sys_sched_setscheduler+0x14/0x18
> >  [<ffffffff8020c0f9>] tracesys+0xdc/0xe1
> > 
> > 
> > Code: 48 89 c8 c3 55 48 89 e5 53 48 83 ec 08 48 8b 9f a8 07 00 00 8b 83 b0 01 00 00 48 8b 8b 98 01 00 00 83 f8 01 74 09 83 f8 02 74 04 <0f> 0b eb fe 48 8b 97 c8 07 00 00 48 2b 53 68 b8 00 00 00 00 48
> > RIP  [<ffffffff8023077b>] update_curr_rt+0x27/0x87
> >  RSP <ffff8101e6805e38>
> > ---[ end trace 792ff0e66da42f45 ]---
> 
> 
> Hmm, that would be me messing up in : 4c121cce
> 
> -       if (!task_has_rt_policy(curr))
> -               return;
> +       BUG_ON(!task_has_rt_policy(curr));
> 
> 
> Does reverting that fix it?

Ack.  Andrew, do you want this hotfix?

---
From:   Peter Zijlstra <peterz@...radead.org>
                                            
Revert the BUG_ON(). Condition is OK and happens.

Tested-by: Randy Dunlap <randy.dunlap@...cle.com>
---
 kernel/sched_rt.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- linux-2.6.24-rc8-mm1.orig/kernel/sched_rt.c
+++ linux-2.6.24-rc8-mm1/kernel/sched_rt.c
@@ -225,7 +225,8 @@ static void update_curr_rt(struct rq *rq
 	struct rt_rq *rt_rq = rt_rq_of_se(rt_se);
 	u64 delta_exec;
 
-	BUG_ON(!task_has_rt_policy(curr));
+	if (!task_has_rt_policy(curr))
+		return;
 
 	delta_exec = rq->clock - curr->se.exec_start;
 	if (unlikely((s64)delta_exec < 0))
--
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