lkml.org 
[lkml]   [1996]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.1.15: Oops in unix_accept

On Fri, 13 Dec 1996, Steffen Zahn wrote:

> I encountered the following (non-fatal) Oops:

[oops deleted]

It's the following sequence in af_unix.c:

do
{
skb=skb_dequeue(&sk->receive_queue);
if(skb==NULL)
{
if(flags&O_NONBLOCK)
return -EAGAIN;
interruptible_sleep_on(sk->sleep);
if(current->signal & ~current->blocked)
return -ERESTARTSYS;
}
if (!(UNIXCB(skb).attr & MSG_SYN))
{
tsk=skb->sk;
tsk->state_change(tsk);
kfree_skb(skb, FREE_WRITE);
skb = NULL;
}
} while(skb==NULL);

Question for a network guru: can the first if be executed without
triggering any of the two return statements? (I assume so, otherwise the
second embedded if makes no sense). If so, does adding a continue
statement at the end of the first if solve the problem?

--- linux-2.1.15/net/unix/af_unix.c.old Fri Dec 13 23:36:35 1996
+++ linux-2.1.15/net/unix/af_unix.c Fri Dec 13 23:37:41 1996
@@ -865,6 +865,7 @@
interruptible_sleep_on(sk->sleep);
if(current->signal & ~current->blocked)
return -ERESTARTSYS;
+ continue;
}
if (!(UNIXCB(skb).attr & MSG_SYN))
{

Ionut

--
It is better to keep your mouth shut and be thought a fool,
than to open it and remove all doubt.


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