libzfs: Zero DIOCLWEDGES input before ioctl.
Otherwise we ask the kernel to write over whatever random pointer was in the stack garbage here, when all we wanted was to learn whether dkwl_nwedges is zero or nonzero. XXX pullup-9
This commit is contained in:
parent
ffdf68d692
commit
549613bcf6
|
@ -1099,6 +1099,7 @@ zpool_open_func(void *arg)
|
|||
off_t size;
|
||||
|
||||
/* skip devices with wedges */
|
||||
memset(&dkwl, 0, sizeof(dkwl));
|
||||
if (native_ioctl(fd, DIOCLWEDGES, &dkwl) == 0 &&
|
||||
dkwl.dkwl_nwedges > 0) {
|
||||
(void) close(fd);
|
||||
|
|
Loading…
Reference in New Issue