Bug 165938 - sysutils/dvdisaster: Fix segfault/drive detection failure on 9.x
Summary: sysutils/dvdisaster: Fix segfault/drive detection failure on 9.x
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Chris Rees
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-11 18:30 UTC by Corey Halpin
Modified: 2012-03-17 11:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Corey Halpin 2012-03-11 18:30:09 UTC
 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 */
Comment 1 Chris Rees freebsd_committer 2012-03-14 18:45:41 UTC
Responsible Changed
From-To: freebsd-ports-bugs->crees

I'll take it.  By the way, please don't put whitespace fixes into a 
patchfile for a port!
Comment 2 dfilter service freebsd_committer 2012-03-17 11:17:11 UTC
crees       2012-03-17 11:16:55 UTC

  FreeBSD ports repository

  Modified files:
    sysutils/dvdisaster  Makefile 
  Added files:
    sysutils/dvdisaster/files patch-scsi-freebsd.c 
  Log:
  Fix segfault while detecting drives due to 9x changes in CAM
  
  PR:             ports/165938
  Submitted by:   Corey Halpin <chalpin@cs.wisc.edu> (author/maintainer)
  
  Also fixes:
  
  PR:             ports/164464
  PR:             ports/165787
  Feature safe:   yes
  
  Revision  Changes    Path
  1.20      +1 -0      ports/sysutils/dvdisaster/Makefile
  1.1       +11 -0     ports/sysutils/dvdisaster/files/patch-scsi-freebsd.c (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Chris Rees freebsd_committer 2012-03-17 11:17:17 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!