tech-kern archive

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

Re: a parallel operation problem about softint(9)



On Fri, Dec 18, 2015 at 11:09:17AM +0900, Kengo NAKAHARA wrote:
> 
> I think softint_disestablish should wait not only SOFTINT_ACTIVE
> but also SOFTINT_PENDING flag, that is, the following patch is
> required

I agree.

> ====================
> --- a/sys/kern/kern_softint.c
> +++ b/sys/kern/kern_softint.c
> @@ -443,7 +443,7 @@ softint_disestablish(void *arg)
>                         flags |= sh->sh_flags;
>                 }
>                 /* Inactive on all CPUs? */
> -               if ((flags & SOFTINT_ACTIVE) == 0) {
> +               if ((flags & (SOFTINT_PENDING | SOFTINT_ACTIVE)) == 0) {
>                         break;
>                 }
>                 /* Oops, still active.  Wait for it to clear. */
> ====================
> Under my environment, this patch fixes above panic, and does not cause
> new problems.

This looks right.

Thor


Home | Main Index | Thread Index | Old Index