svn commit: r251092 - stable/9/sys/dev/mps

Alexander Motin mav at FreeBSD.org
Wed May 29 04:09:33 UTC 2013


Author: mav
Date: Wed May 29 04:09:32 2013
New Revision: 251092
URL: http://svnweb.freebsd.org/changeset/base/251092

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

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

Modified: stable/9/sys/dev/mps/mps_user.c
==============================================================================
--- stable/9/sys/dev/mps/mps_user.c	Wed May 29 01:54:10 2013	(r251091)
+++ stable/9/sys/dev/mps/mps_user.c	Wed May 29 04:09:32 2013	(r251092)
@@ -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-9 mailing list