[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1308953247-25266-5-git-send-email-paul.gortmaker@windriver.com>
Date: Fri, 24 Jun 2011 18:07:11 -0400
From: Paul Gortmaker <paul.gortmaker@...driver.com>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, Allan.Stephens@...driver.com,
Allan Stephens <allan.stephens@...driver.com>,
Paul Gortmaker <paul.gortmaker@...driver.com>
Subject: [PATCH net-next 04/20] tipc: Add sanity check to detect rejection of non-payload messages
From: Allan Stephens <allan.stephens@...driver.com>
Introduces an internal sanity check to ensure that the only undeliverable
messages TIPC attempts to return to their origin are application payload
messages.
Signed-off-by: Allan Stephens <allan.stephens@...driver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@...driver.com>
---
net/tipc/port.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/net/tipc/port.c b/net/tipc/port.c
index 3946b5b..756e64c 100644
--- a/net/tipc/port.c
+++ b/net/tipc/port.c
@@ -367,6 +367,12 @@ int tipc_reject_msg(struct sk_buff *buf, u32 err)
imp++;
/* discard rejected message if it shouldn't be returned to sender */
+
+ if (WARN(!msg_isdata(msg),
+ "attempt to reject message with user=%u", msg_user(msg))) {
+ dump_stack();
+ goto exit;
+ }
if (msg_errcode(msg) || msg_dest_droppable(msg))
goto exit;
--
1.7.4.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists