[PATCH] Re: One more boobytrap needed for 2.2.15pre ?

From: Andris Pavenis (andris@stargate.astr.lu.lv)
Date: Tue Feb 22 2000 - 05:49:16 EST


On Mon, 21 Feb 2000, manfreds@colorfullife.com wrote:
> Zitiere Andris Pavenis <andris@stargate.astr.lu.lv>:
> >
> > It seems that my problems are comming from net_bh. So
> I stuffed it with
> > check_state() to localize source of problem more
> acuratelly. I only added
> > code to skip remaining tests in net_bh() after first
> test failure simply to
> > avoid unnecessary messages) to localize source of
> problem more acuratelly.
> > I\'ll inform about results I\'ll get.
> >
> I came up with a simple trick that might help us to
> speed that up:
> just modify the TASK_RUNNING macro:
>
> -#define TASK_RUNNING 1
> +#define TASK_RUNNING ({if(check_state(\"auto\")
> printk(\"%s:%d\",__FILE__, __LINE__); 1})
>
> I didn\'t test it yet, but looks like a possible
> approach.
>

I tried to localize the problem more exactly in slightly different way:
        grepped net subdirectory for TASK_RUNNING and inserted checks where
        needed (not so much places to change, of course only files that are
        compiled at all)

Result:
        I got first failures of test at end of procedure tcp_recvmsg() (and of
        course later as current->state is changed).

Only difference I saw is that other procedures under linux/net directory which
changes current->state at first sets
        current->state = TASK_RUNNING
and only after that calls remove_waut_queue().

tcp_recvmsg() does this in an opposite way. (and it was only place where I
found corruption). So maybe there could be some race condition and sometime task
state may become corrupted

I'll try to change order and continue testing.

Andris

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Feb 23 2000 - 21:00:30 EST