All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Kacur <jkacur@redhat.com>
To: RT <linux-rt-users@vger.kernel.org>
Cc: Clark Williams <williams@redhat.com>, John Kacur <jkacur@redhat.com>
Subject: [PATCH 1/8] rt-tests: deadline_test: Move va_start forward
Date: Fri, 27 Aug 2021 18:02:37 -0400	[thread overview]
Message-ID: <20210827220244.24210-2-jkacur@redhat.com> (raw)
In-Reply-To: <20210827220244.24210-1-jkacur@redhat.com>

If open_cpuset fails then we return without calling va_end
Fixing this by moving the call to va_start after that.

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 src/sched_deadline/deadline_test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/sched_deadline/deadline_test.c b/src/sched_deadline/deadline_test.c
index a48c231c1281..e89654d976f2 100644
--- a/src/sched_deadline/deadline_test.c
+++ b/src/sched_deadline/deadline_test.c
@@ -728,12 +728,12 @@ static const char *make_cpuset(const char *name, const char *cpus,
 		int *pids;
 		int i;
 
-		va_start(ap, flags);
-
 		fd = open_cpuset(path, "tasks");
 		if (fd < 0)
 			return "open tasks";
 
+		va_start(ap, flags);
+
 		ret = 0;
 		pids = va_arg(ap, int *);
 
-- 
2.31.1


  reply	other threads:[~2021-08-27 22:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27 22:02 [PATCH 0/8] Some miscellanous fixes John Kacur
2021-08-27 22:02 ` John Kacur [this message]
2021-08-27 22:02 ` [PATCH 2/8] rt-tests: deadline_test: Remove deadcode John Kacur
2021-08-27 22:02 ` [PATCH 3/8] rt-tests: ptsematest: " John Kacur
2021-08-27 22:02 ` [PATCH 4/8] rt-tests: pi_stress: Don't call free on alloca John Kacur
2021-08-27 22:02 ` [PATCH 5/8] rt-tests: pip_stress: Add missing paramater in error message John Kacur
2021-08-27 22:02 ` [PATCH 6/8] rt-tests: pi_stress: Add missing parameter and fix types John Kacur
2021-08-27 22:02 ` [PATCH 7/8] rt-tests: deadline_test: Exit with message if threads less than 1 John Kacur
2021-08-27 22:02 ` [PATCH 8/8] rt-numa: Use sched_getaffinity() instead of pthread_getaffinity_np() John Kacur

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=20210827220244.24210-2-jkacur@redhat.com \
    --to=jkacur@redhat.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=williams@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.