diff options
author | Allan Stephens | 2011-04-19 16:17:58 +0200 |
---|---|---|
committer | Paul Gortmaker | 2011-05-10 22:03:53 +0200 |
commit | bebc55aeffa72d8198e5c54cab9973a30e92f854 (patch) | |
tree | fe7ec71280dd2ec218e831b5849e89a8d7dc37bc /net/tipc/bcast.c | |
parent | tipc: Update destination node field on incoming multicast messages (diff) | |
download | kernel-qcow2-linux-bebc55aeffa72d8198e5c54cab9973a30e92f854.tar.gz kernel-qcow2-linux-bebc55aeffa72d8198e5c54cab9973a30e92f854.tar.xz kernel-qcow2-linux-bebc55aeffa72d8198e5c54cab9973a30e92f854.zip |
tipc: Fix sk_buff leaks when link congestion is detected
Modifies a TIPC send routine that did not discard the outgoing sk_buff
if it was not transmitted because of link congestion; this eliminates
the potential for buffer leakage in the many callers who did not clean up
the unsent buffer. (The two routines that previously did discard the unsent
buffer have been updated to eliminate their now-redundant clean up.)
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/bcast.c')
-rw-r--r-- | net/tipc/bcast.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c index 08e3216a33d2..fa68d1e9ff4b 100644 --- a/net/tipc/bcast.c +++ b/net/tipc/bcast.c @@ -407,9 +407,7 @@ int tipc_bclink_send_msg(struct sk_buff *buf) spin_lock_bh(&bc_lock); res = tipc_link_send_buf(bcl, buf); - if (unlikely(res == -ELINKCONG)) - buf_discard(buf); - else + if (likely(res > 0)) bclink_set_last_sent(); bcl->stats.queue_sz_counts++; |