diff options
author | mav <mav@FreeBSD.org> | 2012-10-12 17:18:24 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2012-10-12 17:18:24 +0000 |
commit | c5f476d2d7820c7b7b4c31187aa82e69111ec748 (patch) | |
tree | 8b5f5e6ab8e907cfbc0b2a9b51189d423ca630e9 /sys/cam/cam_xpt.c | |
parent | 6e22acd47bf1dfd002d3a75ebc6decf639036bc5 (diff) | |
download | FreeBSD-src-c5f476d2d7820c7b7b4c31187aa82e69111ec748.zip FreeBSD-src-c5f476d2d7820c7b7b4c31187aa82e69111ec748.tar.gz |
Protect xpt_getattr() calls with the SIM lock and assert that.
Submitted by: ken@ (earlier version)
Diffstat (limited to 'sys/cam/cam_xpt.c')
-rw-r--r-- | sys/cam/cam_xpt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 374e870..a5ae5bc 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -1111,6 +1111,8 @@ xpt_getattr(char *buf, size_t len, const char *attr, struct cam_path *path) int ret = -1; struct ccb_dev_advinfo cdai; + mtx_assert(path->bus->sim->mtx, MA_OWNED); + memset(&cdai, 0, sizeof(cdai)); xpt_setup_ccb(&cdai.ccb_h, path, CAM_PRIORITY_NORMAL); cdai.ccb_h.func_code = XPT_DEV_ADVINFO; |