Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 May 2006 21:40:22 GMT
From:      Marius Strobl <marius@alchemy.franken.de>
To:        freebsd-sparc64@FreeBSD.org
Subject:   Re: sparc64/98084: kernel panic when using tap interface driver on 6_stable/sparc64
Message-ID:  <200605292140.k4TLeMvF083921@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR sparc64/98084; it has been noted by GNATS.

From: Marius Strobl <marius@alchemy.franken.de>
To: Michael Ortmann <mortmann@googlemail.com>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: sparc64/98084: kernel panic when using tap interface driver on 6_stable/sparc64
Date: Mon, 29 May 2006 23:36:48 +0200

 --jI8keyz6grp/JLjh
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 On Mon, May 29, 2006 at 12:12:22PM +0000, Michael Ortmann wrote:
 > 
 > using the tap interface on 6_stable/sparc64 will lead to kernel panic
 > disovered when i tried to setup openvpn, but its no openvpn issue
 > "cat /dev/zero >/dev/tap0" will crash the machine instantly, any time
 > can be 100% reproduced on my machine (u60, smp)
 > i compiled and installed 6_stable (world+kernel) without optimization flags but with debug flags, so its no optimization issue
 > kernel coredump available
 > it seems to be no hardware issue since its a) reproduceable and b) make buildworld/installworld runs just fine.
 > 
 > my guess: tap interface driver broken for sparc64?
 > 
 > == symptom ==
 > 
 > # cat /dev/zero >/dev/tap0
 > 
 
 I can't actually reproduce this via `cat /dev/zero >/dev/tap0` but
 I think I have an idea what's the problem. Could you please give
 the attached patch a try?
 
 Thanks,
 Marius
 
 
 -- 
 This mail was scanned by AntiVir Milter.
 This product is licensed for non-commercial use.
 See www.antivir.de for details.
 --jI8keyz6grp/JLjh
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="if_tap.c.diff"
 
 Index: if_tap.c
 ===================================================================
 RCS file: /mnt/alchemy/usr/data/bsd/cvs/fbsd/src/sys/net/if_tap.c,v
 retrieving revision 1.60
 diff -u -r1.60 if_tap.c
 --- if_tap.c	17 May 2006 17:05:02 -0000	1.60
 +++ if_tap.c	29 May 2006 19:24:06 -0000
 @@ -631,11 +631,11 @@
  			break;
  
  		case TAPSDEBUG:
 -			tapdebug = *(intptr_t *)data;
 +			tapdebug = *(int *)data;
  			break;
  
  		case TAPGDEBUG:
 -			*(intptr_t *)data = tapdebug;
 +			*(int *)data = tapdebug;
  			break;
  
  		case FIONBIO:
 @@ -644,7 +644,7 @@
  		case FIOASYNC:
  			s = splimp();
  			mtx_lock(&tp->tap_mtx);
 -			if (*(intptr_t *)data)
 +			if (*(int *)data)
  				tp->tap_flags |= TAP_ASYNC;
  			else
  				tp->tap_flags &= ~TAP_ASYNC;
 @@ -657,27 +657,27 @@
  			if (ifp->if_snd.ifq_head) {
  				struct mbuf	*mb = ifp->if_snd.ifq_head;
  
 -				for(*(intptr_t *)data = 0;mb != NULL;mb = mb->m_next)
 -					*(intptr_t *)data += mb->m_len;
 +				for(*(int *)data = 0;mb != NULL;mb = mb->m_next)
 +					*(int *)data += mb->m_len;
  			} else
 -				*(intptr_t *)data = 0;
 +				*(int *)data = 0;
  			splx(s);
  			break;
  
  		case FIOSETOWN:
 -			return (fsetown(*(intptr_t *)data, &tp->tap_sigio));
 +			return (fsetown(*(int *)data, &tp->tap_sigio));
  
  		case FIOGETOWN:
 -			*(intptr_t *)data = fgetown(&tp->tap_sigio);
 +			*(int *)data = fgetown(&tp->tap_sigio);
  			return (0);
  
  		/* this is deprecated, FIOSETOWN should be used instead */
  		case TIOCSPGRP:
 -			return (fsetown(-(*(intptr_t *)data), &tp->tap_sigio));
 +			return (fsetown(-(*(int *)data), &tp->tap_sigio));
  
  		/* this is deprecated, FIOGETOWN should be used instead */
  		case TIOCGPGRP:
 -			*(intptr_t *)data = -fgetown(&tp->tap_sigio);
 +			*(int *)data = -fgetown(&tp->tap_sigio);
  			return (0);
  
  		/* VMware/VMnet port ioctl's */
 
 
 --jI8keyz6grp/JLjh--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605292140.k4TLeMvF083921>