Page MenuHomeFreeBSD

D2891.id6393.diff
No OneTemporary

D2891.id6393.diff

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

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)

Event Timeline