netdev
[Top] [All Lists]

BUG in tcp.c ?

To: netdev <netdev@xxxxxxxxxxx>
Subject: BUG in tcp.c ?
From: Rik van Riel <riel@xxxxxxxxxxxxxxxx>
Date: Fri, 6 Oct 2000 19:25:38 -0300 (BRST)
Cc: linux-kernel@xxxxxxxxxxxxxxx
Sender: owner-netdev@xxxxxxxxxxx
Hi,

I found the following lines in tcp.c, after trying to identify
and track down what I thought to be an nbd bug...

net/ipv4/tcp.c:

   1028       if (tcp_memory_free(sk))
   1029               skb = tcp_alloc_skb(sk, tmp, GFP_KERNEL)

While this looks ok at first glance, it rather conflicts with
the following lines of code from net/core/sock.c:

    785               skb = alloc_skb(try_size, sk->allocation);

And from drivers/block/nbd.c:

    109               sock->sk->allocation = GFP_ATOMIC;
......
    121               if (send)
    122                       result = sock_sendmsg(sock, &msg, size);


Here we see that the nbd driver sets the allocation type to
GFP_ATOMIC (and for a good reason), sock.c honours this field,
but for some reason tcp.c doesn't ...

Is this an actual bug, or am I overlooking something?

regards,

Rik
--
"What you're running that piece of shit Gnome?!?!"
       -- Miguel de Icaza, UKUUG 2000

http://www.conectiva.com/               http://www.surriel.com/


<Prev in Thread] Current Thread [Next in Thread>