Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 Nov 2004 11:52:52 -0800
From:      Maksim Yevmenkin <maksim.yevmenkin@savvis.net>
To:        Niki Denev <nike_d@cytexbg.com>
Cc:        current@freebsd.org
Subject:   Re: bluetooth / hcseriald panics -current.
Message-ID:  <4187E594.5080306@savvis.net>
In-Reply-To: <cone.1097714033.77176.578.1001@phobos.totalterror.net>
References:  <cone.1097691798.355655.4951.1001@niked.office.suresupport.com> <cone.1097705266.944205.768.1001@phobos.totalterror.net> <416DB569.4010805@savvis.net> <cone.1097710541.778981.578.1001@phobos.totalterror.net> <416DC1E5.1060904@savvis.net> <cone.1097714033.77176.578.1001@phobos.totalterror.net>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------060106090403000906090205
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hi Niki,

sorry for the delay. i was able to reproduce and track down the problem. 
please find attached patch. let me know if it works for you.

i'm sorry about this.

max

Niki Denev wrote:
> Maksim Yevmenkin writes:
> 
>>
>> stack trace?
>> what is the version of sio.c?
>>
>> i'm trying to reproduce it on my system with xircom cbt adapter.
>>
> 
> sio.c is 1.456
> 
> here is the crash message and the trace :
> 
> kernel trap 12 with interrupts disabled
> 
> Fatal trap 12: page fault while in kernel mode
> fault virtual address = 0x64
> fault code            = supervisor write, page not present
> instruction pointer   = 0x8:0xc062f2b1
> stack pointer         = 0x10:0xe6879a2c
> frame pointer         = 0x10:0xe6879a38
> code segment          = base 0x0, limit 0xfffff, type 0x1b
>                      = DPL 0, pres 1, def32 1, gran 1
> processor eflags      = resume, IOPL = 0
> current process       = 542 (hcseriald)
> [thread 100071]
> Stopped at      comstop+0x75:    andl   $-0x5,0x64(%eax)
> db> trace
> comstop(c1d6c000,3) at comstop+0x75
> ttyflush(c1d6c000,3,c1fd0600,303468,e6879a80) at ttyflush+0x37
> ng_h4_open(c1d5f900,c1d6c000) at ng_h4_open+0x194
> ttioctl(c1d6c000,8004741b,e6879c60,3,c206a948) at ttioctl+0xc32
> ttyioctl(c1d5f900,8004741b,e6879c60,3,c1d8b180) at ttyioctl+0x41
> spec_ioctl(d540bb88,e6879c34,c056a017,e6879b88,c06e8100) at spec_ioctl+0xee
> spec_vnoperate(d540bb88) at spec_vnoperate+0x13
> vn_ioctl(c1d84110,8004741b,e6879c60,c1ff0380,c1d8b180) at vn_ioctl+0x1ab
> ioctl(c1d8b180,e6879d14,3,1,246) at ioctl+0x3e0
> syscall(2f,2f,2f,bfbfe8ec,bfbfee67) at syscall+0x213
> Xint0x80_syscall() at Xint0x80_syscall+0x1f
> --- syscall (54, FreeBSD ELF32, ioctl), eip = 0x280ce80f, esp = 
> 0xbfbfe80c, ebp = 0xbfbfed54 ---
> db>
> 
> --niki
> 


--------------060106090403000906090205
Content-Type: text/plain;
 name="ng_h4.c.diff.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="ng_h4.c.diff.txt"

--- /usr/src/sys/netgraph/bluetooth/drivers/h4/ng_h4.c	Sat Jul 10 17:06:58 2004
+++ ng_h4.c	Tue Nov  2 11:47:26 2004
@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $Id: ng_h4.c,v 1.5 2003/05/10 05:51:25 max Exp $
+ * $Id: ng_h4.c,v 1.7 2004/08/23 18:08:15 max Exp $
  * $FreeBSD: src/sys/netgraph/bluetooth/drivers/h4/ng_h4.c,v 1.10 2004/06/26 08:44:04 phk Exp $
  * 
  * Based on:
@@ -70,6 +70,8 @@
  *****************************************************************************
  *****************************************************************************/
 
+NET_NEEDS_GIANT("ng_h4");
+
 /* MALLOC define */
 #ifndef NG_SEPARATE_MALLOC
 MALLOC_DEFINE(M_NETGRAPH_H4, "netgraph_h4", "Netgraph Bluetooth H4 node");
@@ -199,7 +201,7 @@
 
 	/* Set back pointers */
 	NG_NODE_SET_PRIVATE(sc->node, sc);
-	tp->t_sc = (caddr_t) sc;
+	tp->t_lsc = (caddr_t) sc;
 
 	/* The node has to be a WRITER because data can change node status */
 	NG_NODE_FORCE_WRITER(sc->node);
@@ -228,7 +230,7 @@
 static int
 ng_h4_close(struct tty *tp, int flag)
 {
-	ng_h4_info_p	sc = (ng_h4_info_p) tp->t_sc;
+	ng_h4_info_p	sc = (ng_h4_info_p) tp->t_lsc;
 	int		s;
 
 	s = spltty(); /* XXX */
@@ -236,7 +238,7 @@
 	ttyflush(tp, FREAD | FWRITE);
 	clist_free_cblocks(&tp->t_outq);
 	if (sc != NULL) {
-		tp->t_sc = NULL;
+		tp->t_lsc = NULL;
 
 		if (sc->node != NULL) {
 			if (sc->flags & NG_H4_TIMEOUT)
@@ -285,7 +287,7 @@
 ng_h4_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag,
 		struct thread *td)
 {
-	ng_h4_info_p	sc = (ng_h4_info_p) tp->t_sc;
+	ng_h4_info_p	sc = (ng_h4_info_p) tp->t_lsc;
 	int		s, error = 0;
 
 	s = spltty(); /* XXX */
@@ -326,7 +328,7 @@
 static int
 ng_h4_input(int c, struct tty *tp)
 {
-	ng_h4_info_p	sc = (ng_h4_info_p) tp->t_sc;
+	ng_h4_info_p	sc = (ng_h4_info_p) tp->t_lsc;
 
 	if (sc == NULL || tp != sc->tp ||
 	    sc->node == NULL || NG_NODE_NOT_VALID(sc->node))
@@ -546,7 +548,7 @@
 static int
 ng_h4_start(struct tty *tp)
 {
-	ng_h4_info_p	sc = (ng_h4_info_p) tp->t_sc;
+	ng_h4_info_p	sc = (ng_h4_info_p) tp->t_lsc;
 
 	if (sc == NULL || tp != sc->tp || 
 	    sc->node == NULL || NG_NODE_NOT_VALID(sc->node))

--------------060106090403000906090205--



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