Re: [PATCH 3/4] software node: verify that property data is not on stack
From: Andy Shevchenko
Date: Tue Mar 24 2026 - 08:44:28 EST
On Mon, Mar 23, 2026 at 05:39:39PM -0700, Dmitry Torokhov wrote:
> When registering a software node, ensure that the property data is not
> located on the stack, as it is expected to persist for the lifetime of
> the node.
...
> +#include <linux/sched/task_stack.h>
Looking at this name the use of it here doesn't sound right...
...
> + for (prop = node->properties; prop && prop->name; prop++) {
> + if (!prop->is_inline && object_is_on_stack(prop->pointer)) {
> + pr_err("%s: property data can't be on stack\n", __func__);
> + return -EINVAL;
> + }
> + }
And again same question, why we can't simply dup them as we do for (string)
arrays?
--
With Best Regards,
Andy Shevchenko