Re: HEADS UP! ATAng committed

From: Thomas Quinot <thomas_at_FreeBSD.ORG>
Date: Thu, 28 Aug 2003 00:39:59 +0200
Le 2003-08-25, Matt écrivait :

> Fatal trap 12: page fault while in kernel mode
> fault virtual address = 0x0
> fault code = supervisor write, page not present
> instruction pointer = 0x8:0xc015e59e
> stack pointer = 0x10:0xd717bac0
> frame pointer = 0x10:0xd717bacc
> code segment = base 0x0, limit 0xfffff, type 0x1b
>              = DPL 0, pres 1, def32 1, gran 1
> processor eflags = interrupt enabled, resume, IOPL = 0
> current process = 18 (swi3: cambio)
> kernel: type 12 trap, code=0
> Stopped at  free_hcb+0x2e: movl %eax,0(%edx)

OK, trivial one. Thanks to all who contributed feedback on this issue.

Thomas.

Index: atapi-cam.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/ata/atapi-cam.c,v
retrieving revision 1.20
diff -u -r1.20 atapi-cam.c
--- atapi-cam.c	24 Aug 2003 17:48:05 -0000	1.20
+++ atapi-cam.c	27 Aug 2003 22:35:56 -0000
_at__at_ -465,9 +465,10 _at__at_
 	if ((ccb_h->flags & CAM_DIR_MASK) == CAM_DIR_IN && (len & 1)) {
 	    /* ATA always transfers an even number of bytes */
 	    if (!(buf = hcb->dxfer_alloc = malloc(++len, M_ATACAM,
-						  M_NOWAIT | M_ZERO)))
+						  M_NOWAIT | M_ZERO))) {
 		printf("cannot allocate ATAPI/CAM buffer\n");
 		goto action_oom;
+	    }
 	}
 	request->device = dev;
 	request->driver = hcb;

-- 
    Thomas.Quinot_at_Cuivre.FR.EU.ORG
Received on Wed Aug 27 2003 - 13:40:01 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:20 UTC