lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-cbe28296eb1ac441b35cf45804d0ae808add7dd1@git.kernel.org>
Date:	Sat, 21 Mar 2009 15:18:53 GMT
From:	Li Zefan <lizf@...fujitsu.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, acme@...hat.com, hpa@...or.com,
	mingo@...hat.com, lizf@...fujitsu.com, jens.axboe@...cle.com,
	fweisbec@...il.com, rostedt@...dmis.org, tglx@...utronix.de,
	mingo@...e.hu
Subject: [tip:tracing/blktrace] blktrace: don't increase blk_probes_ref if failed to setup blk trace

Commit-ID:  cbe28296eb1ac441b35cf45804d0ae808add7dd1
Gitweb:     http://git.kernel.org/tip/cbe28296eb1ac441b35cf45804d0ae808add7dd1
Author:     Li Zefan <lizf@...fujitsu.com>
AuthorDate: Fri, 20 Mar 2009 09:48:47 +0800
Committer:  Ingo Molnar <mingo@...e.hu>
CommitDate: Sat, 21 Mar 2009 16:16:37 +0100

blktrace: don't increase blk_probes_ref if failed to setup blk trace

do_blk_trace_setup() may return EBUSY, but the current code
doesn't decrease blk_probes_ref in this case.

Signed-off-by: Li Zefan <lizf@...fujitsu.com>
Acked-by: Frederic Weisbecker <fweisbec@...il.com>
Acked-by: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Jens Axboe <jens.axboe@...cle.com>
Cc: Steven Rostedt <rostedt@...dmis.org>
LKML-Reference: <49C2F5FF.80002@...fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>


---
 kernel/trace/blktrace.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 223b92e..11e7c8d 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -468,9 +468,6 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
 	bt->pid = buts->pid;
 	bt->trace_state = Blktrace_setup;
 
-	if (atomic_add_return(1, &blk_probes_ref) == 1)
-		blk_register_tracepoints();
-
 	ret = -EBUSY;
 	old_bt = xchg(&q->blk_trace, bt);
 	if (old_bt) {
@@ -478,6 +475,9 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
 		goto err;
 	}
 
+	if (atomic_add_return(1, &blk_probes_ref) == 1)
+		blk_register_tracepoints();
+
 	return 0;
 err:
 	if (bt) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ