Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F101361513
D2891.id6393.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
781 B
Referenced Files
None
Subscribers
None
D2891.id6393.diff
View Options
Index: sys/dev/sfxge/sfxge.c
===================================================================
--- sys/dev/sfxge/sfxge.c
+++ sys/dev/sfxge/sfxge.c
@@ -905,8 +905,15 @@
efx_vpd_value_t value;
int rc;
- if ((rc = efx_vpd_size(sc->enp, &sc->vpd_size)) != 0)
+ if ((rc = efx_vpd_size(sc->enp, &sc->vpd_size)) != 0) {
+ /*
+ * Unpriviledged functions deny VPD access.
+ * Simply skip VPD in this case.
+ */
+ if (rc == EACCES)
+ goto done;
goto fail;
+ }
sc->vpd_data = malloc(sc->vpd_size, M_SFXGE, M_WAITOK);
if ((rc = efx_vpd_read(sc->enp, sc->vpd_data, sc->vpd_size)) != 0)
goto fail2;
@@ -935,6 +942,7 @@
for (keyword[1] = 'A'; keyword[1] <= 'Z'; keyword[1]++)
sfxge_vpd_try_add(sc, vpd_list, EFX_VPD_RO, keyword);
+done:
return (0);
fail2:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Oct 29, 10:35 AM (22 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14375446
Default Alt Text
D2891.id6393.diff (781 B)
Attached To
Mode
D2891: sfxge: skip VPD info population if access is denied
Attached
Detach File
Event Timeline
Log In to Comment