FreeBSD Bugzilla – Attachment 247382 Details for
Bug 276039
Crash on sysctl -a with FreeBSD-15.0-CURRENT-amd64-20231228-fb03f7f8e30d-267242-memstick.img.xz
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
openzfs patch
diff (text/plain), 1.70 KB, created by
Mark Johnston
on 2024-01-01 01:09:48 UTC
(
hide
)
Description:
openzfs patch
Filename:
MIME Type:
Creator:
Mark Johnston
Created:
2024-01-01 01:09:48 UTC
Size:
1.70 KB
patch
obsolete
>diff --git a/sys/contrib/openzfs/module/zfs/spa.c b/sys/contrib/openzfs/module/zfs/spa.c >index a21b0decf6a3..dc8a99e7bd25 100644 >--- a/sys/contrib/openzfs/module/zfs/spa.c >+++ b/sys/contrib/openzfs/module/zfs/spa.c >@@ -1445,8 +1445,6 @@ spa_taskq_write_param_get(char *buf, zfs_kernel_param_t *kp) > return (spa_taskq_param_get(ZIO_TYPE_WRITE, buf)); > } > #else >-#include <sys/sbuf.h> >- > /* > * On FreeBSD load-time parameters can be set up before malloc() is available, > * so we have to do all the parsing work on the stack. >@@ -1457,19 +1455,11 @@ static int > spa_taskq_read_param(ZFS_MODULE_PARAM_ARGS) > { > char buf[SPA_TASKQ_PARAM_MAX]; >- int err = 0; >- >- if (req->newptr == NULL) { >- int len = spa_taskq_param_get(ZIO_TYPE_READ, buf); >- struct sbuf *s = sbuf_new_for_sysctl(NULL, NULL, len+1, req); >- sbuf_cpy(s, buf); >- err = sbuf_finish(s); >- sbuf_delete(s); >- return (err); >- } >+ int err; > >+ (void) spa_taskq_param_get(ZIO_TYPE_READ, buf); > err = sysctl_handle_string(oidp, buf, sizeof (buf), req); >- if (err) >+ if (err || req->newptr == NULL) > return (err); > return (spa_taskq_param_set(ZIO_TYPE_READ, buf)); > } >@@ -1478,19 +1468,11 @@ static int > spa_taskq_write_param(ZFS_MODULE_PARAM_ARGS) > { > char buf[SPA_TASKQ_PARAM_MAX]; >- int err = 0; >- >- if (req->newptr == NULL) { >- int len = spa_taskq_param_get(ZIO_TYPE_WRITE, buf); >- struct sbuf *s = sbuf_new_for_sysctl(NULL, NULL, len+1, req); >- sbuf_cpy(s, buf); >- err = sbuf_finish(s); >- sbuf_delete(s); >- return (err); >- } >+ int err; > >+ (void) spa_taskq_param_get(ZIO_TYPE_WRITE, buf); > err = sysctl_handle_string(oidp, buf, sizeof (buf), req); >- if (err) >+ if (err || req->newptr == NULL) > return (err); > return (spa_taskq_param_set(ZIO_TYPE_WRITE, buf)); > }
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 276039
: 247382