* end up running out of memory because of this buffer allocation, we
* want to kill the offending app first.
*/
- wrapper_set_current_oom_origin();
+ set_current_oom_origin();
num_pages_per_subbuf = num_pages >> get_count_order(num_subbuf);
subbuf_size = chanb->subbuf_size;
* will not fault.
*/
wrapper_vmalloc_sync_mappings();
- wrapper_clear_current_oom_origin();
+ clear_current_oom_origin();
vfree(pages);
return 0;
array_error:
vfree(pages);
pages_error:
- wrapper_clear_current_oom_origin();
+ clear_current_oom_origin();
not_enough_pages:
return -ENOMEM;
}
chanb->extra_reader_sb =
(config->mode == RING_BUFFER_OVERWRITE) ? 1 : 0;
chanb->num_subbuf = num_subbuf;
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
+ strscpy(chanb->name, name, NAME_MAX);
+#else
strlcpy(chanb->name, name, NAME_MAX);
+#endif
memcpy(&chanb->config, config, sizeof(chanb->config));
if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {