Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 May 2013 04:10:57 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r251093 - stable/8/sys/dev/mps
Message-ID:  <201305290410.r4T4Avqs095748@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Wed May 29 04:10:57 2013
New Revision: 251093
URL: http://svnweb.freebsd.org/changeset/base/251093

Log:
  MFC r250900:
  Fix NULL-dereference kernel panic in case of mps_attach() failure.

Modified:
  stable/8/sys/dev/mps/mps_user.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)
  stable/8/sys/dev/mps/   (props changed)

Modified: stable/8/sys/dev/mps/mps_user.c
==============================================================================
--- stable/8/sys/dev/mps/mps_user.c	Wed May 29 04:09:32 2013	(r251092)
+++ stable/8/sys/dev/mps/mps_user.c	Wed May 29 04:10:57 2013	(r251093)
@@ -208,8 +208,8 @@ mps_detach_user(struct mps_softc *sc)
 {
 
 	/* XXX: do a purge of pending requests? */
-	destroy_dev(sc->mps_cdev);
-
+	if (sc->mps_cdev != NULL)
+		destroy_dev(sc->mps_cdev);
 }
 
 static int



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