FreeBSD Bugzilla – Attachment 234605 Details for
Bug 264513
cam: panic: panic: make_dev_alias_v: bad si_name (error=22, on HPE JBOD
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Don't panic if the physpath cannot create a valid device alias
0001-ses-don-t-panic-if-disk-elements-have-really-weird-d.patch (text/plain), 1.88 KB, created by
Alan Somers
on 2022-06-10 22:50:26 UTC
(
hide
)
Description:
Don't panic if the physpath cannot create a valid device alias
Filename:
MIME Type:
Creator:
Alan Somers
Created:
2022-06-10 22:50:26 UTC
Size:
1.88 KB
patch
obsolete
>From 9f50ed568df71d0d44f9e84eefd36c7c66751b4f Mon Sep 17 00:00:00 2001 >From: Alan Somers <asomers@FreeBSD.org> >Date: Fri, 10 Jun 2022 16:44:59 -0600 >Subject: [PATCH] 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> >MFC after: 2 weeks >--- > sys/cam/scsi/scsi_pass.c | 5 +++-- > sys/geom/geom_dev.c | 4 ++-- > 2 files changed, 5 insertions(+), 4 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); > } > >diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c >index ad382b357f2f..a9a1c927449f 100644 >--- a/sys/geom/geom_dev.c >+++ b/sys/geom/geom_dev.c >@@ -273,8 +273,8 @@ g_dev_set_physpath(struct g_consumer *cp) > dev = sc->sc_dev; > old_alias_dev = sc->sc_alias; > alias_devp = (struct cdev **)&sc->sc_alias; >- make_dev_physpath_alias(MAKEDEV_WAITOK, alias_devp, dev, >- old_alias_dev, physpath); >+ make_dev_physpath_alias(MAKEDEV_WAITOK | MAKEDEV_CHECKNAME, >+ alias_devp, dev, old_alias_dev, physpath); > } else if (sc->sc_alias) { > destroy_dev((struct cdev *)sc->sc_alias); > sc->sc_alias = NULL; >-- >2.35.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 264513
:
234514
| 234605