| To: | Andrea Arcangeli <andrea@xxxxxxx> |
|---|---|
| Subject: | Re: route cache DoS testing and softirqs |
| From: | Srivatsa Vaddagiri <vatsa@xxxxxxxxxx> |
| Date: | Tue, 30 Mar 2004 11:05:15 +0530 |
| Cc: | Dipankar Sarma <dipankar@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx, Robert Olsson <Robert.Olsson@xxxxxxxxxxx>, "Paul E. McKenney" <paulmck@xxxxxxxxxx>, Dave Miller <davem@xxxxxxxxxx>, Alexey Kuznetsov <kuznet@xxxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxx>, rusty@xxxxxxxxxxx |
| In-reply-to: | <20040330050614.GA4669@xxxxxxxxxx> |
| References: | <20040329184550.GA4540@xxxxxxxxxx> <20040329222926.GF3808@xxxxxxxxxxxxxxxxx> <20040330050614.GA4669@xxxxxxxxxx> |
| Reply-to: | vatsa@xxxxxxxxxx |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.4.1i |
On Tue, Mar 30, 2004 at 10:36:14AM +0530, Srivatsa Vaddagiri wrote:
> kthread_stop does:
>
> 1. kthread_stop_info.k = k;
> 2. wake_up_process(k);
>
> and if ksoftirqd were to do :
>
> a. while (!kthread_should_stop()) {
> b. __set_current_state(TASK_INTERRUPTIBLE);
> c. schedule();
> }
>
>
> There is a (narrow) possibility here that a) happens _after_ 1) as well as
> b) _after_ 2).
hmm .. I meant a) happening _before_ 1) and b) happening _after_ 2) ..
>
> a. __set_current_state(TASK_INTERRUPTIBLE);
> b. while (!kthread_should_stop()) {
> c. schedule();
> d. __set_current_state(TASK_INTERRUPTIBLE);
> }
>
> e. __set_current_state(TASK_RUNNING);
>
> In this case, even if b) happens _after_ 1) and c) _after_ 2),
Again I meant "even if b) happens _before_ 1) and c) _after_ 2) !!
> schedule simply returns immediately because task's state would have been set
> to TASK_RUNNING by 2). It goes back to the kthread_should_stop() check and
> exits!
--
Thanks and Regards,
Srivatsa Vaddagiri,
Linux Technology Center,
IBM Software Labs,
Bangalore, INDIA - 560017
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: BUG in tcp_timer.c:tcp_retransmit_timer(), Nagendra Singh Tomar |
|---|---|
| Next by Date: | Re: BUG in tcp_timer.c:tcp_retransmit_timer(), David S. Miller |
| Previous by Thread: | Re: route cache DoS testing and softirqs, Srivatsa Vaddagiri |
| Next by Thread: | Re: route cache DoS testing and softirqs, Andrea Arcangeli |
| Indexes: | [Date] [Thread] [Top] [All Lists] |