svn commit: r189157 - in stable/7/sys: . cam contrib/pf
dev/ath/ath_hal dev/cxgb
Edward Tomasz Napierala
trasz at FreeBSD.org
Sat Feb 28 02:53:21 PST 2009
Author: trasz
Date: Sat Feb 28 10:53:20 2009
New Revision: 189157
URL: http://svn.freebsd.org/changeset/base/189157
Log:
MFC r187649:
Guard against NULL pointer dereference.
Reviewed by: scottl
Approved by: rwatson (mentor)
Sponsored by: FreeBSD Foundation
Found with: Coverity Prevent(tm)
CID: 130
Modified:
stable/7/sys/ (props changed)
stable/7/sys/cam/cam_periph.c
stable/7/sys/contrib/pf/ (props changed)
stable/7/sys/dev/ath/ath_hal/ (props changed)
stable/7/sys/dev/cxgb/ (props changed)
Modified: stable/7/sys/cam/cam_periph.c
==============================================================================
--- stable/7/sys/cam/cam_periph.c Sat Feb 28 10:50:59 2009 (r189156)
+++ stable/7/sys/cam/cam_periph.c Sat Feb 28 10:53:20 2009 (r189157)
@@ -171,6 +171,10 @@ cam_periph_alloc(periph_ctor_t *periph_c
break;
}
xpt_unlock_buses();
+ if (p_drv == NULL) {
+ printf("cam_periph_alloc: invalid periph name '%s'\n", name);
+ return (CAM_REQ_INVALID);
+ }
sim = xpt_path_sim(path);
path_id = xpt_path_path_id(path);
More information about the svn-src-stable-7
mailing list