lkml.org 
[lkml]   [2000]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    SubjectRe: Oops in 2.2.15pre7
    Date
    Hello!

    > > Do you mean that this will be enough, and similar thing in tty_io.c?
    > Only not here! synchronize_irq() must follow fasync list modification.
    > You modify list and then wait for readers. See?
    Nope.
    As I see it will be:
    CPU0 CPU1
    kill_fasync unattaching this list node
    start to work on next (*)
    list node kfree_s it.
    -----------------------------------------------
    Access fasync->next >(OOPS)

    Or do you mean that synchronize_irq must be inserted in (*) (see patch)?
    If this is not right, too, then show your version, pls.

    --- socket.c.orig Mon Feb 21 16:38:03 2000
    +++ socket.c Mon Feb 21 16:39:34 2000
    @@ -521,6 +521,7 @@
    if(fa!=NULL)
    {
    fa->fa_fd=fd;
    + synchronize_irq();
    kfree_s(fna,sizeof(struct fasync_struct));
    release_sock(sock->sk);
    return 0;
    @@ -536,6 +537,7 @@
    if (fa!=NULL)
    {
    *prev=fa->fa_next;
    + synchronize_irq();
    kfree_s(fa,sizeof(struct fasync_struct));
    }
    }
    > Correct reader will see either list before modification or after modification,
    > both of them are valid. kill_fasync() is correct reader,
    > I do not know about tty_io.c.
    In tty_io.c we have function fasync_helper, which is much the same as
    socket.c::sock_fasync (besides that it works not with sockets),
    and the only difference is that in fasync_helper we *do* have sti/cli
    (Alan quoted that part from fasync_helper), and sock_fasync does not have
    sti/cli.

    Bye,
    Oleg
    --
    [RAVE *SUCKS* TEAM] [Team $Ui(iDE] [Trans-M Must Die!] [Sepultura Fans Team]
    [Tolkien forever team]

    -
    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/

    \
     
     \ /
      Last update: 2005-03-22 13:56    [W:0.036 / U:0.580 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site