aboutsummaryrefslogtreecommitdiff
path: root/sys/cam
diff options
context:
space:
mode:
authorAlan Somers <asomers@FreeBSD.org>2022-06-10 22:44:59 +0000
committerAlan Somers <asomers@FreeBSD.org>2022-06-23 17:19:20 +0000
commit5f438dd3acba47e54e63b13bfff31a49bcc6ddea (patch)
tree68c36cbcb7d979538bc12962e2e0282ffff857aa /sys/cam
parent1f1e2261e341e6ca6862f82261066ef1705f0a7a (diff)
downloadsrc-5f438dd3acba47e54e63b13bfff31a49bcc6ddea.tar.gz
src-5f438dd3acba47e54e63b13bfff31a49bcc6ddea.zip
ses: don't panic if disk elements have really weird descriptors
SES allows element descriptors to contain characters like spaces and quotes that devfs does not allow to appear in device aliases. Since SES element descriptors are outside of the kernel's control, we should gracefully handle a failure to create a device physical path alias. PR: 264513 Reported by: Yuri <yuri@aetern.org> Reviewed by: imp, mav Sponsored by: Axcient MFC after: 2 weeks
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/scsi/scsi_pass.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/cam/scsi/scsi_pass.c b/sys/cam/scsi/scsi_pass.c
index e74e19acc409..7f66ca458bd7 100644
--- a/sys/cam/scsi/scsi_pass.c
+++ b/sys/cam/scsi/scsi_pass.c
@@ -457,8 +457,9 @@ pass_add_physpath(void *context, int pending)
"GEOM::physpath", periph->path) == 0
&& strlen(physpath) != 0) {
mtx_unlock(mtx);
- make_dev_physpath_alias(MAKEDEV_WAITOK, &softc->alias_dev,
- softc->dev, softc->alias_dev, physpath);
+ make_dev_physpath_alias(MAKEDEV_WAITOK | MAKEDEV_CHECKNAME,
+ &softc->alias_dev, softc->dev,
+ softc->alias_dev, physpath);
mtx_lock(mtx);
}