tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/kern



rmind%NetBSD.org@localhost said:
> > This is actually not a permission problem but broken error
> > reporting.
> > [...]
> > panic
> I have commited a bunch of fixes. Should work now.

The error reporting works as expected now, thanks.
(It would still be better if errno wouldn't be overwritten --
perhaps save and restore it?)

The panic is still there... I believe the problem is in
the signal handling code -- see the appended patch. With
that applied, I wasn't able to trigger it.
There is also something which looks like another off-by-one
in sched_m2. It appearently didn't cause problems, just
noticed by code inspection.

best regards
Matthias





-------------------------------------------------------------------
-------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich

Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Dr. Sebastian M. Schmidt
-------------------------------------------------------------------
-------------------------------------------------------------------
#
# old_revision [0801cf1de950425545489e091157d5eb40f25b10]
#
# patch "sys/kern/kern_sig.c"
#  from [af3102ba6286f4c43c5507acd2ae7258b43a92c8]
#    to [dabf7015fea65d4403f10f85a5e3802b616933fb]
# 
# patch "sys/kern/sched_m2.c"
#  from [3d17ab6d545ac64a17596ee7683fb4344a3f7614]
#    to [5cf1298a63dc989e190beda6abcf7c453a2d630e]
#
============================================================
--- sys/kern/kern_sig.c af3102ba6286f4c43c5507acd2ae7258b43a92c8
+++ sys/kern/kern_sig.c dabf7015fea65d4403f10f85a5e3802b616933fb
@@ -1053,8 +1053,10 @@ sigpost(struct lwp *l, sig_t action, int
         * If killing the process, make it run fast.
         */
        if (__predict_false((prop & SA_KILL) != 0) &&
-           action == SIG_DFL && l->l_priority > PUSER)
-               lwp_changepri(l, PUSER);
+           action == SIG_DFL && l->l_priority < MAXPRI_USER) {
+               KASSERT(l->l_class == SCHED_OTHER);
+               lwp_changepri(l, MAXPRI_USER);
+       }
 
        /*
         * If the LWP is running or on a run queue, then we win.  If it's
============================================================
--- sys/kern/sched_m2.c 3d17ab6d545ac64a17596ee7683fb4344a3f7614
+++ sys/kern/sched_m2.c 5cf1298a63dc989e190beda6abcf7c453a2d630e
@@ -512,7 +512,7 @@ sched_pstats_hook(struct lwp *l)
        sil->sl_rtsum = 0;
 
        /* Estimate threads on time-sharing queue only */
-       if (l->l_priority >= PRI_HIGHEST_TS)
+       if (l->l_priority > PRI_HIGHEST_TS)
                return;
        KASSERT(l->l_class == SCHED_OTHER);
 


Home | Main Index | Thread Index | Old Index