Hi Willy,

Here is a small patch to fix an annoying bug when demux buffer allocation fails in H2.

--
Christopher Faulet
>From ccf62f1411d64654b6249d28b1f0b89763bbedbb Mon Sep 17 00:00:00 2001
From: Christopher Faulet <[email protected]>
Date: Mon, 26 Feb 2018 13:43:38 +0100
Subject: [PATCH] BUG/MINOR: h2: Set the target of dbuf_wait to h2c

In h2_get_dbuf, when the buffer allocation was failing, dbuf_wait.target was
errornously set to the connection (h2c->conn) instead of the h2 connection
descriptor (h2c).

This patch must be backported to 1.8.
---
 src/mux_h2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mux_h2.c b/src/mux_h2.c
index 9b42d7bbe..de05ca04a 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -277,7 +277,7 @@ static inline struct buffer *h2_get_dbuf(struct h2c *h2c)
 
 	if (likely(LIST_ISEMPTY(&h2c->dbuf_wait.list)) &&
 	    unlikely((buf = b_alloc_margin(&h2c->dbuf, 0)) == NULL)) {
-		h2c->dbuf_wait.target = h2c->conn;
+		h2c->dbuf_wait.target = h2c;
 		h2c->dbuf_wait.wakeup_cb = h2_dbuf_available;
 		HA_SPIN_LOCK(BUF_WQ_LOCK, &buffer_wq_lock);
 		LIST_ADDQ(&buffer_wq, &h2c->dbuf_wait.list);
-- 
2.14.3

Reply via email to