Date: Mon, 19 May 1997 21:27:28 +0900 (JST) From: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: kern/3629: /sys/scsi/pt.c doesn't initialize buf_queue Message-ID: <199705191227.VAA00503@ichi.sat.t.u-tokyo.ac.jp> Resent-Message-ID: <199705191230.FAA18387@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 3629 >Category: kern >Synopsis: /sys/scsi/pt.c doesn't initialize buf_queue >Confidential: no >Severity: critical >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon May 19 05:30:01 PDT 1997 >Last-Modified: >Originator: Hidetoshi Shimokawa >Organization: Univ. of Tokyo >Release: FreeBSD 2.2-STABLE i386 >Environment: FreeBSD-2.2 + EPSON scanner (processor type SCSI device) >Description: pt.c is using pt->buf_queue without initialization. >How-To-Repeat: I found this bug while writing scanner control program. >Fix: Please apply the following patch *** pt.c.org Sat Sep 7 08:09:12 1996 --- pt.c Mon May 19 21:00:56 1997 *************** *** 86,92 **** 0, {0, 0}, SDEV_ONCE_ONLY, /* Only one open allowed */ ! 0, "Processor", ptopen, sizeof(struct scsi_data), --- 86,92 ---- 0, {0, 0}, SDEV_ONCE_ONLY, /* Only one open allowed */ ! ptattach, "Processor", ptopen, sizeof(struct scsi_data), *************** *** 98,103 **** --- 98,112 ---- 0, pt_strategy, }; + + static errval + ptattach(struct scsi_link *sc_link) + { + struct scsi_data *pt = sc_link->sd; + + TAILQ_INIT(&pt->buf_queue); + return 0; + } /* * ptstart looks to see if there is a buf waiting for the device And, I appreciate if you add the following entry in scsiconf.c I would like to submit scanner control program as port later. #if NPT > 0 { T_PROCESSOR, T_PROCESSOR, T_FIXED, "EPSON SC", "*", "*", "pt", SC_ONE_LU }, #endif /* NPT */ >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705191227.VAA00503>