NetBSD Problem Report #44131
From mm_lists@pulsar-zone.net Mon Nov 22 21:09:47 2010
Return-Path: <mm_lists@pulsar-zone.net>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id D2FEE63B95F
for <gnats-bugs@gnats.NetBSD.org>; Mon, 22 Nov 2010 21:09:46 +0000 (UTC)
Message-Id: <201011222109.oAML9i0U005596@ginseng.pulsar-zone.net>
Date: Mon, 22 Nov 2010 16:09:43 -0500
From: Matthew Mondor <mm_lists@pulsar-zone.net>
To: gnats-bugs@gnats.NetBSD.org
Subject: if_tap.c tap_dev_ioctl() not propagating error
>Number: 44131
>Category: kern
>Synopsis: if_tap.c tap_dev_ioctl() not propagating error
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 22 21:10:00 +0000 2010
>Closed-Date: Sun Dec 12 08:49:16 +0000 2010
>Last-Modified: Sun Dec 12 08:49:16 +0000 2010
>Originator: Matthew Mondor
>Release: NetBSD 5.1_STABLE and -current
>Organization:
>Environment:
NetBSD behemoth.xisop 5.1 NetBSD 5.1 (GENERIC_MM) #0: Sun Nov 21 00:19:56 EST 2010 root@behemoth.xisop:/usr/obj/sys/arch/i386/compile/GENERIC_MM i386
Architecture: i386
Machine: i386
>Description:
When tap(4) ioctl(2)s are invoked, any error reported by internal
functions, such as fsetown(9)/fgetown(9), or even the default ENOTTY
error, don't get propagated at return time. The error variable is
assigned where necessary, but the final return always returns 0,
meaning success.
>How-To-Repeat:
>Fix:
Apply the attached diff (against -current).
--MP_/BLdxG_rBDoXLx2d+=S3XH+D
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=tap-diff.txt
Index: sys/net/if_tap.c
===================================================================
RCS file: /nfs/ginseng/home/data/cvsup/netbsd/src/sys/net/if_tap.c,v
retrieving revision 1.65
diff -u -p -r1.65 if_tap.c
--- sys/net/if_tap.c 19 May 2010 20:41:59 -0000 1.65
+++ sys/net/if_tap.c 22 Nov 2010 20:56:40 -0000
@@ -1137,7 +1137,7 @@ tap_dev_ioctl(int unit, u_long cmd, void
break;
}
- return (0);
+ return error;
}
static int
--MP_/BLdxG_rBDoXLx2d+=S3XH+D--
>Release-Note:
>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/44131 CVS commit: src/sys/net
Date: Mon, 22 Nov 2010 16:31:53 -0500
Module Name: src
Committed By: christos
Date: Mon Nov 22 21:31:52 UTC 2010
Modified Files:
src/sys/net: if_tap.c
Log Message:
PR/44131: Matthew Mondor: if_tap.c tap_dev_ioctl() not propagating error,
always returns 0.
To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/net/if_tap.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Matthew Mondor <mm_lists@pulsar-zone.net>
To: gnats-bugs@NetBSD.org
Cc: christos@NetBSD.org
Subject: Re: PR/44131 CVS commit: src/sys/net
Date: Tue, 23 Nov 2010 00:24:55 -0500
On Mon, 22 Nov 2010 21:35:02 +0000 (UTC)
"Christos Zoulas" <christos@netbsd.org> wrote:
> Log Message:
> PR/44131: Matthew Mondor: if_tap.c tap_dev_ioctl() not propagating error,
> always returns 0.
Thanks, Christos.
Do you think that this fix should also be pulled-up to NetBSD-5? It
does have the same bug, but I think it's non-critical.
If a pullup is not worth it, this PR can be closed.
--
Matt
From: christos@zoulas.com (Christos Zoulas)
To: Matthew Mondor <mm_lists@pulsar-zone.net>, gnats-bugs@NetBSD.org
Cc:
Subject: Re: PR/44131 CVS commit: src/sys/net
Date: Tue, 23 Nov 2010 00:27:51 -0500
On Nov 23, 12:24am, mm_lists@pulsar-zone.net (Matthew Mondor) wrote:
-- Subject: Re: PR/44131 CVS commit: src/sys/net
| On Mon, 22 Nov 2010 21:35:02 +0000 (UTC)
| "Christos Zoulas" <christos@netbsd.org> wrote:
|
| > Log Message:
| > PR/44131: Matthew Mondor: if_tap.c tap_dev_ioctl() not propagating error,
| > always returns 0.
|
| Thanks, Christos.
|
| Do you think that this fix should also be pulled-up to NetBSD-5? It
| does have the same bug, but I think it's non-critical.
|
| If a pullup is not worth it, this PR can be closed.
You are welcome. I issued a pullup.
christos
State-Changed-From-To: open->pending-pullups
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Tue, 23 Nov 2010 07:20:49 +0000
State-Changed-Why:
that's pullup-5 #1492
From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/44131 CVS commit: [netbsd-5] src/sys/net
Date: Thu, 9 Dec 2010 04:11:39 +0000
Module Name: src
Committed By: riz
Date: Thu Dec 9 04:11:39 UTC 2010
Modified Files:
src/sys/net [netbsd-5]: if_tap.c
Log Message:
Pull up following revision(s) (requested by christos in ticket #1492):
sys/net/if_tap.c: revision 1.66
PR/44131: Matthew Mondor: if_tap.c tap_dev_ioctl() not propagating error,
always returns 0.
To generate a diff of this commit:
cvs rdiff -u -r1.47.4.7 -r1.47.4.8 src/sys/net/if_tap.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: pending-pullups->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 12 Dec 2010 08:49:16 +0000
State-Changed-Why:
pullup completed, thanks
>Unformatted:
--MP_/BLdxG_rBDoXLx2d+=S3XH+D
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.