svn commit: r251093 - stable/8/sys/dev/mps

Alexander Motin mav at FreeBSD.org
Wed May 29 04:10:57 UTC 2013


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


More information about the svn-src-stable-8 mailing list