Re: [PATCH 2/2] s390/iucv: Fix vargs handling in iucv_alloc_device()

Greg Kroah-Hartman
2024-08-13T10:52:22Z

On Tue, Aug 13, 2024 at 12:42:37PM +0200, Vasily Gorbik wrote:
> From: Heiko Carstens <hca@linux.ibm.com>
>
> iucv_alloc_device() gets a format string and a varying number of
> arguments. This is incorrectly forwarded by calling dev_set_name() with
> the format string and a va_list, while dev_set_name() expects also a
> varying number of arguments.
>
> Fix this and call kobject_set_name_vargs() instead which expects a
> va_list parameter.

I don't understand, why can't dev_set_name() be called here?

Calling "raw" kobject functions is almost never the correct thing to be
doing, ESPECIALLY as you have a struct device here.

thanks,

greg k-h