linux-mips
[Top] [All Lists]

Re: explain to me how this works...

To: linux-mips@linux-mips.org
Subject: Re: explain to me how this works...
From: Ralf Baechle <ralf@linux-mips.org>
Date: Thu, 14 Nov 2002 23:27:48 +0100
In-reply-to: <20021114131232.B1706@wumpus.internal.keyresearch.com>; from lindahl@keyresearch.com on Thu, Nov 14, 2002 at 01:12:32PM -0800
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20021005095335.B4079@lucon.org> <20021113174200.A2874@wumpus.internal.keyresearch.com> <20021114193924.A5610@linux-mips.org> <20021114113045.D1494@wumpus.internal.keyresearch.com> <20021114120746.E28717@mvista.com> <20021114211251.C5610@linux-mips.org> <20021114131232.B1706@wumpus.internal.keyresearch.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.2.5.1i
On Thu, Nov 14, 2002 at 01:12:32PM -0800, Greg Lindahl wrote:

> strace says:
> 
> socket(PF_PACKET, SOCK_DGRAM, 0)        = 4183
> socket(PF_PACKET, SOCK_DGRAM, 0)        = 4183
> socket(PF_PACKET, SOCK_DGRAM, 0)        = -1 EAFNOSUPPORT (Address family not 
> supported by protocol)
> 
> printk says:
> 
> sys_socket returning 0
> sys32_socket returning 0
> sys_socket returning -124
> sys32_socket returning -124
> 
> Note strace sees 3 syscalls. I only printk at the return statement, 
> and there are 2 of those. I'll add more printks...

This smells alot like syscall restarting.  The first two times the
syscall fails with one of ERESTARTNOHAND, ERESTARTSYS or ERESTARTNOINTR,
then the third time is fails with EAFNOSUPPORT.

Enable CONFIG_PACKET and CONFIG_NETLINK_DEV.

The only bug here is strace being to stupid to filter out syscall restarts.

  Ralf

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