Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Nov 1995 21:17:38 +0900
From:      yuhara@flab.fujitsu.co.jp
To:        bugs@freebsd.org
Subject:   scsi_ioctl.c causes PANIC
Message-ID:  <199511101217.VAA11819@cindy.avalon.flab.fujitsu.co.jp>

next in thread | raw e-mail | index | archive | help
Bug Report: scsi_ioctl.c causes panic.

FreeBSD version: 2.1.0-SNAP-951005
File: /usr/src/sys/scsi_ioctl.c
Function: scsi_do_ioctl()

Problem: 
	If screq->datalen (== len) is zero, B_BUSY flag is not set
	for bp->b_flags, which results in a panic in biodone():
		if (!(bp->b_flags & B_BUSY))
			panic("biodone: buffer not busy");

Fix: set bp->bflags to B_BUSY in scsi_ioctl.c

			} else {
				/* if no data, no need to translate it.. */
				bp->b_un.b_addr = 0;
				bp->b_dev = dev;
				bp->b_flags = 0;  /* !!!!!! HERE !!!!!*/

				scsistrategy(bp);
				ret =  bp->b_error;


(I'm not on the mailing list. Please include my address in your reply.)

------
Masanobu Yuhara		yuhara@flab.fujitsu.co.jp
Fujitsu Laboratories Ltd.




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