diff options
author | 2024-03-25 21:11:58 +0100 | |
---|---|---|
committer | 2024-03-25 21:11:58 +0100 | |
commit | 36a1818f5a1e50b805317ba13f827067d50f6970 (patch) | |
tree | b9414b9509bea9f006c292a46a7632ffb57d18ee /lib/dynamic_debug.c | |
parent | dma-buf: Fix NULL pointer dereference in sanitycheck() (diff) | |
parent | Linux 6.9-rc1 (diff) | |
download | wireguard-linux-36a1818f5a1e50b805317ba13f827067d50f6970.tar.xz wireguard-linux-36a1818f5a1e50b805317ba13f827067d50f6970.zip |
Merge drm/drm-fixes into drm-misc-fixes
Backmerging to get drm-misc-fixes to the state of v6.9-rc1.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Diffstat (limited to '')
-rw-r--r-- | lib/dynamic_debug.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 6fba6423cc10..c78f335fa981 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -640,10 +640,9 @@ static int param_set_dyndbg_classnames(const char *instr, const struct kernel_pa int cls_id, totct = 0; bool wanted; - cl_str = tmp = kstrdup(instr, GFP_KERNEL); - p = strchr(cl_str, '\n'); - if (p) - *p = '\0'; + cl_str = tmp = kstrdup_and_replace(instr, '\n', '\0', GFP_KERNEL); + if (!tmp) + return -ENOMEM; /* start with previously set state-bits, then modify */ curr_bits = old_bits = *dcp->bits; |