Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Mar 2012 13:26:29 -0500 (CDT)
From:      Corey Halpin <chalpin@cs.wisc.edu>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/165938: sysutils/dvdisaster: Fix segfault/drive detection failure on 9.x
Message-ID:  <201203111826.q2BIQTFh008814@hobbes.home.crhalpin.org>
Resent-Message-ID: <201203111830.q2BIUAxZ006368@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         165938
>Category:       ports
>Synopsis:       sysutils/dvdisaster: Fix segfault/drive detection failure on 9.x
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 11 18:30:09 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Corey Halpin
>Release:        FreeBSD 9.0-RELEASE i386
>Organization:
>Environment:
>Description:
 Environment:
 System: FreeBSD hobbes.home.crhalpin.org 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:15:25 UTC 2012 root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
 
 Description:
 
   On FreeBSD 9.x, sysutils/dvdisaster fails to detect drives (due to changes in CAM), sometimes segfaulting.
 
 How-To-Repeat:
 
   Run dvdisaster on a 9.x system.
 
 Fix:
 
 The attached patch fixes the problem, and should also resolve PRs 164464 and 165787.
 
 diff -ruN /usr/ports/sysutils/dvdisaster/Makefile dvdisaster/Makefile
 --- /usr/ports/sysutils/dvdisaster/Makefile	2012-03-02 00:10:57.000000000 -0600
 +++ dvdisaster/Makefile	2012-03-11 13:16:04.000000000 -0500
 @@ -7,6 +7,7 @@
 
  PORTNAME=	dvdisaster
  PORTVERSION=	0.72.3
 +PORTREVISION=   1
  CATEGORIES=	sysutils
  MASTER_SITES=	SF \
                 http://dvdisaster.net/downloads/
 diff -ruN /usr/ports/sysutils/dvdisaster/files/patch-fix_drive_detection dvdisaster/files/patch-fix_drive_detection
 --- /usr/ports/sysutils/dvdisaster/files/patch-fix_drive_detection	1969-12-31 18:00:00.000000000 -0600
 +++ dvdisaster/files/patch-fix_drive_detection	2012-03-11 13:02:54.000000000 -0500
 @@ -0,0 +1,28 @@
 +--- /dev/shm/dvdisaster-0.72.3/scsi-freebsd.c	2011-10-02 20:32:04.000000000 +0200
 ++++ scsi-freebsd.c	2012-03-11 18:19:09.000000000 +0100
 +@@ -177,7 +177,6 @@
 +       Stop("illegal data_mode: %d", data_mode);
 +    }
 +
 +-
 +    cam_fill_csio(&ccb->csio, 1, NULL, flags, CAM_TAG_ACTION_NONE,//MSG_SIMPLE_Q_TAG,
 +                buf, size, sizeof(struct scsi_sense_data), cdb_size,
 +                120*1000);  /* 120 secs timeout */
 +@@ -194,7 +193,7 @@
 +
 +    /* Extract sense data */
 +
 +-   memcpy(sense, &(ccb->csio.sense_data), sizeof(struct scsi_sense_data));
 ++   memcpy(sense, &(ccb->csio.sense_data), sizeof(Sense));
 +
 +    if((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP)
 +      return 0;
 +@@ -204,8 +203,6 @@
 +    status = ccb->csio.scsi_status;
 +
 +    return -1;
 +-
 +-
 + }
 +
 + #endif /* SYS_FREEBSD */
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:



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