From owner-cvs-sys Wed Jun 25 12:09:07 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id MAA09120 for cvs-sys-outgoing; Wed, 25 Jun 1997 12:09:07 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id MAA09068; Wed, 25 Jun 1997 12:08:52 -0700 (PDT) From: Tor Egge Received: (from tegge@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id MAA26570; Wed, 25 Jun 1997 12:07:45 -0700 (PDT) Date: Wed, 25 Jun 1997 12:07:45 -0700 (PDT) Message-Id: <199706251907.MAA26570@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-sys@FreeBSD.ORG Subject: cvs commit: src/sys/scsi scsi_driver.c scsi_driver.h scsiconf.h sd.c Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk tegge 1997/06/25 12:07:45 PDT Modified files: sys/scsi scsi_driver.c scsi_driver.h scsiconf.h sd.c Log: Introduce an advisory exclusive lock on the scsi link structure. Change sd_open, sd_close and sd_ioctl to use this lock to ensure serialization of some critical operations, thus avoiding some race conditions. Ideas picked from NetBSD (ccd and sd devices). This fixes one of the problems noted in PR kern/3688. Reviewed by: "Justin T. Gibbs" Revision Changes Path 1.24 +23 -1 src/sys/scsi/scsi_driver.c 1.12 +3 -1 src/sys/scsi/scsi_driver.h 1.55 +3 -1 src/sys/scsi/scsiconf.h 1.106 +18 -1 src/sys/scsi/sd.c