svn commit: r250900 - head/sys/dev/mps

Alexander Motin mav at FreeBSD.org
Wed May 22 02:15:08 UTC 2013


Author: mav
Date: Wed May 22 02:15:07 2013
New Revision: 250900
URL: http://svnweb.freebsd.org/changeset/base/250900

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

Modified:
  head/sys/dev/mps/mps_user.c

Modified: head/sys/dev/mps/mps_user.c
==============================================================================
--- head/sys/dev/mps/mps_user.c	Wed May 22 01:03:41 2013	(r250899)
+++ head/sys/dev/mps/mps_user.c	Wed May 22 02:15:07 2013	(r250900)
@@ -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-head mailing list