Thread (9 messages) 9 messages, 3 authors, 2018-09-28

Re: [PATCH v5 3/4] devres: provide devm_kstrdup_const()

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2018-09-28 07:30:59
Also in: linux-arch, linux-mm, lkml

On Fri, Sep 28, 2018 at 9:14 AM Bartosz Golaszewski [off-list ref] wrote:
Provide a resource managed version of kstrdup_const(). This variant
internally calls devm_kstrdup() on pointers that are outside of
.rodata section and returns the string as is otherwise.

Make devm_kfree() check if the passed pointer doesn't point to .rodata
and if so - don't actually destroy the resource.

Signed-off-by: Bartosz Golaszewski <redacted>
Reviewed-by: Bjorn Andersson <redacted>
Acked-by: Mike Rapoport <redacted>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help