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

2018-10-16 Thread Greg Kroah-Hartman
On Sun, Oct 14, 2018 at 05:20:09PM +0200, Bartosz Golaszewski 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

[RESEND PATCH v6 3/4] devres: provide devm_kstrdup_const()

2018-10-14 Thread Bartosz Golaszewski
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

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

2018-09-30 Thread Bartosz Golaszewski
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