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>] [day] [month] [year] [list]
Message-Id: <1305742736-19434-4-git-send-email-ali@avrc.city.ac.uk>
Date:	Wed, 18 May 2011 19:18:54 +0100
From:	"J. Ali Harlow" <ali@...c.city.ac.uk>
To:	Greg Kroah-Hartman <greg@...ah.com>
Cc:	devel@...uxdriverproject.org, Manuel Gebele <forensixs@....de>,
	linux-kernel@...r.kernel.org
Subject: [PATCH 4/6] comedi vmk80xx: extend rudimentary_check to check both directions

rudimentary_check() can currently check whether the input or
output direction is currently available (no pending transaction),
but not both at the same time. We need this facility for do_bits().

Signed-off-by: J. Ali Harlow <ali@...c.city.ac.uk>
---
 drivers/staging/comedi/drivers/vmk80xx.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/comedi/drivers/vmk80xx.c b/drivers/staging/comedi/drivers/vmk80xx.c
index c86c866..669ebf85 100644
--- a/drivers/staging/comedi/drivers/vmk80xx.c
+++ b/drivers/staging/comedi/drivers/vmk80xx.c
@@ -568,7 +568,8 @@ static int rudimentary_check(struct vmk80xx_usb *dev, int dir)
 	if (dir & DIR_IN) {
 		if (test_bit(TRANS_IN_BUSY, &dev->flags))
 			return -EBUSY;
-	} else {  /* DIR_OUT */
+	}
+	if (dir & DIR_OUT) {
 		if (test_bit(TRANS_OUT_BUSY, &dev->flags))
 			return -EBUSY;
 	}
-- 
1.7.4.1

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