mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vasily Gorbik <gor@linux.ibm.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	Alexandra Winter <wintera@linux.ibm.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	linux-s390@vger.kernel.org
Subject: [PATCH 2/2] s390/iucv: Fix vargs handling in iucv_alloc_device()
Date: Tue, 13 Aug 2024 12:42:37 +0200	[thread overview]
Message-ID: <patch-2.thread-d8267b.git-d8267bded9e9.your-ad-here.call-01723545029-ext-2515@work.hours> (raw)
In-Reply-To: <cover.thread-d8267b.your-ad-here.call-01723545029-ext-2515@work.hours>

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.

Fixes: 4452e8ef8c36 ("s390/iucv: Provide iucv_alloc_device() / iucv_release_device()")
Reference-ID: https://bugzilla.linux.ibm.com/show_bug.cgi?id=208008
Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
---
 net/iucv/iucv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c
index 1e42e13ad24e..64102a31b569 100644
--- a/net/iucv/iucv.c
+++ b/net/iucv/iucv.c
@@ -92,7 +92,7 @@ struct device *iucv_alloc_device(const struct attribute_group **attrs,
 	if (!dev)
 		goto out_error;
 	va_start(vargs, fmt);
-	rc = dev_set_name(dev, fmt, vargs);
+	rc = kobject_set_name_vargs(&dev->kobj, fmt, vargs);
 	va_end(vargs);
 	if (rc)
 		goto out_error;
-- 
2.41.0

  parent reply	other threads:[~2024-08-13 10:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-13 10:42 [PATCH 0/2] " Vasily Gorbik
2024-08-13 10:42 ` [PATCH 1/2] kobject: Export kobject_set_name_vargs() symbol Vasily Gorbik
2024-08-13 10:51   ` Greg Kroah-Hartman
2024-08-13 10:42 ` Vasily Gorbik [this message]
2024-08-13 10:52   ` [PATCH 2/2] s390/iucv: Fix vargs handling in iucv_alloc_device() Greg Kroah-Hartman
2024-08-13 11:50     ` Vasily Gorbik
2024-08-13 12:43       ` Greg Kroah-Hartman
2024-08-13 13:09         ` Vasily Gorbik
2024-08-13 13:35         ` Alexandra Winter
2024-08-13 14:36           ` Vasily Gorbik
2024-08-13 15:29           ` Greg Kroah-Hartman
2024-08-13 18:21             ` Vasily Gorbik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=patch-2.thread-d8267b.git-d8267bded9e9.your-ad-here.call-01723545029-ext-2515@work.hours \
    --to=gor@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hca@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=wintera@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®