lkml.org 
[lkml]   [1998]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: minor patch for 2.1.88 net/core/sock.c


On Thu, 5 Mar 1998, A.N.Kuznetsov wrote:
>
> The code was wrong, but the fix is wrong too.

No, I think the fix is fine.

> We cannot leave atomic_read(&sk->wmem_alloc) >= sk->sndbuf here

Why? The "sndbuf" should be considered to be purely advisory.

> (it can occur, if sk->wmem_alloc was increased by another process while sleep),
> because it would block subsequent sock_alloc_send_skb forever.

No, it should block only until the packet has been sent. The bug is
something else - like the write allocation never going away or something.

It looks like sock_kmalloc() is just completely broken as designed, and
should just be removed: there is one user of it, but it should probably
use sock_wmalloc() instead which fixes up the counts correctly by having a
correct skb->destroy function.

Linus


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.076 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site