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]
Date:   Mon,  6 Nov 2017 01:26:09 +0000
From:   Bryan O'Donoghue <pure.logic@...us-software.ie>
To:     johan@...nel.org, elder@...nel.org, gregkh@...uxfoundation.org,
        devel@...verdev.osuosl.org, keescook@...omium.org,
        linux-kernel@...r.kernel.org
Cc:     Bryan O'Donoghue <pure.logic@...us-software.ie>,
        Mitch Tasman <tasman@...flabs.com>,
        greybus-dev@...ts.linaro.org
Subject: [PATCH v2 2/4] staging: greybus: loopback: Fix iteration count on async path

Commit 12927835d211 ("greybus: loopback: Add asynchronous bi-directional
support") does what it says on the tin - namely, adds support for
asynchronous bi-directional loopback operations.

What it neglects to do though is increment the per-connection
gb->iteration_count on an asynchronous operation error. This patch fixes
that omission.

Fixes: 12927835d211 ("greybus: loopback: Add asynchronous bi-directional support")

Signed-off-by: Bryan O'Donoghue <pure.logic@...us-software.ie>
Reported-by: Mitch Tasman <tasman@...flabs.com>
Cc: Johan Hovold <johan@...nel.org>
Cc: Alex Elder <elder@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Mitch Tasman <tasman@...flabs.com>
Cc: greybus-dev@...ts.linaro.org
Cc: devel@...verdev.osuosl.org
Cc: linux-kernel@...r.kernel.org
---
 drivers/staging/greybus/loopback.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c
index 20d1b45..9c5980c 100644
--- a/drivers/staging/greybus/loopback.c
+++ b/drivers/staging/greybus/loopback.c
@@ -1021,8 +1021,10 @@ static int gb_loopback_fn(void *data)
 			else if (type == GB_LOOPBACK_TYPE_SINK)
 				error = gb_loopback_async_sink(gb, size);
 
-			if (error)
+			if (error) {
 				gb->error++;
+				gb->iteration_count++;
+			}
 		} else {
 			/* We are effectively single threaded here */
 			if (type == GB_LOOPBACK_TYPE_PING)
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ