Re: [Question]How to restrict some kind of task?

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

 



On Thu, 17 Nov 2005 17:20, liyu wrote:
> I fixed it. we should insert code start of enqueue_task():
>
> static void enqueue_task(struct task_struct *p, prio_array_t *array)
> {
>              unsigned long flags;
>
>              spin_lock_irqsave(&(task_rq(p)->keep_lock), flags);
>              if (p->flags & PF_KEEPOVER) {
>                      list_del(&p->run_list);
>                      p->state = TASK_RUNNING;
>                      p->flags &= ~PF_KEEPOVER;
>              }
>              spin_unlock_irqrestore(&(task_rq(p)->keep_lock), flags);
>
> ....
> }
> However, this patch still have problem, it may lock entire system.
>
> I am trying to catch this bug~.

The obvious bug is that there are places that expect a task to be added to the 
run list after it has called enqueue_task and you've broken that expectation. 
The locking in the rest of your patch did not look too robust, but I don't 
have time to review it sorry.

Cheers,
Con
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux