mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Fix ixl debug sysctls panic
Remove the use of sbuf_data on drained sbufs from the debug sysctls: * ixl_sysctl_hw_res_alloc * ixl_sysctl_switch_config This prevents a kernel panic when accessing these values under a kernel compiled with INVARIANTS. Sponsored by: Multiplay
This commit is contained in:
parent
e72a4bdeb2
commit
9cc0d05612
1 changed files with 2 additions and 19 deletions
|
|
@ -5119,17 +5119,9 @@ ixl_sysctl_hw_res_alloc(SYSCTL_HANDLER_ARGS)
|
|||
}
|
||||
|
||||
error = sbuf_finish(buf);
|
||||
if (error) {
|
||||
device_printf(dev, "Error finishing sbuf: %d\n", error);
|
||||
sbuf_delete(buf);
|
||||
return error;
|
||||
}
|
||||
|
||||
error = sysctl_handle_string(oidp, sbuf_data(buf), sbuf_len(buf), req);
|
||||
if (error)
|
||||
device_printf(dev, "sysctl error: %d\n", error);
|
||||
sbuf_delete(buf);
|
||||
return error;
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -5236,15 +5228,6 @@ ixl_sysctl_switch_config(SYSCTL_HANDLER_ARGS)
|
|||
sbuf_delete(nmbuf);
|
||||
|
||||
error = sbuf_finish(buf);
|
||||
if (error) {
|
||||
device_printf(dev, "Error finishing sbuf: %d\n", error);
|
||||
sbuf_delete(buf);
|
||||
return error;
|
||||
}
|
||||
|
||||
error = sysctl_handle_string(oidp, sbuf_data(buf), sbuf_len(buf), req);
|
||||
if (error)
|
||||
device_printf(dev, "sysctl error: %d\n", error);
|
||||
sbuf_delete(buf);
|
||||
|
||||
return (error);
|
||||
|
|
|
|||
Loading…
Reference in a new issue