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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1326763928-1972-2-git-send-email-namhyung.kim@lge.com>
Date:	Tue, 17 Jan 2012 10:32:07 +0900
From:	Namhyung Kim <namhyung.kim@....com>
To:	Jens Axboe <axboe@...nel.dk>
Cc:	Namhyung Kim <namhyung@...il.com>, linux-kernel@...r.kernel.org,
	Tejun Heo <tj@...nel.org>
Subject: [PATCH 2/3] block: prevent duplicated bio completion report

Since previous patch make block_bio_complete TP working,
it will generate duplicated BLK_TA_COMPLETEs for bounced
bios. Fix it.

Signed-off-by: Namhyung Kim <namhyung.kim@....com>
Cc: Tejun Heo <tj@...nel.org>
---
 include/linux/blk_types.h    |    3 +++
 include/trace/events/block.h |    3 ++-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index 4053cbd4490e..45cd0074a1c8 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -97,6 +97,9 @@ struct bio {
 #define BIO_MAPPED_INTEGRITY 11/* integrity metadata has been remapped */
 #define bio_flagged(bio, flag)	((bio)->bi_flags & (1 << (flag)))
 
+/* masked bio's won't report its completion via tracepoint */
+#define BIO_COMPLETE_MASK	(1 << BIO_BOUNCED)
+
 /*
  * top 4 bits of bio flags indicate the pool this bio came from
  */
diff --git a/include/trace/events/block.h b/include/trace/events/block.h
index 96955f4828b3..72888542e186 100644
--- a/include/trace/events/block.h
+++ b/include/trace/events/block.h
@@ -219,7 +219,8 @@ TRACE_EVENT_CONDITION(block_bio_complete,
 
 	TP_ARGS(q, bio, error),
 
-	TP_CONDITION(bio->bi_bdev != NULL),
+	TP_CONDITION(bio->bi_bdev != NULL &&
+		     !(bio->bi_flags & BIO_COMPLETE_MASK)),
 
 	TP_STRUCT__entry(
 		__field( dev_t,		dev		)
-- 
1.7.9.rc1.dirty

--
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