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] [day] [month] [year] [list]
Message-ID: <4C1F0FC7.60605@pengutronix.de>
Date:	Mon, 21 Jun 2010 09:07:51 +0200
From:	Marc Kleine-Budde <mkl@...gutronix.de>
To:	Ben Dooks <ben-linux@...ff.org>
CC:	Sascha Hauer <sha@...gutronix.de>, linux-i2c@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] i2c-imx: do not allow interruptions when waiting for
 I2C to complete (resend)

Ben Dooks wrote:
> On Tue, Jun 15, 2010 at 12:20:38PM +0200, Marc Kleine-Budde wrote:
>> The i2c_imx_trx_complete() function is using
>> wait_event_interruptible_timeout() to wait for the I2C controller to
>> signal that it has completed an I2C bus operation. If the process that
>> causes the I2C operation receives a signal, the wait will be
>> interrupted, returning an error. It is better to let the I2C operation
>> finished before handling the signal (i.e. returning into userspace).
>>
>> It is safe to use wait_event_timeout() instead, because the timeout
>> will allow the process to exit if the I2C bus hangs. It's also better
>> to allow the I2C operation to finish, because unacknowledged I2C
>> operations can cause the I2C bus to hang.
> 
> Hmm, if it times out, do you need to at-least try sending a stop
> on the bus? or does the caller do that for you?

The caller of the caller does this. "i2c_imx_xfer" will call
"i2c_imx_stop", and this function will generate the stop condition if
not already done so.

I'm sending a V3 version of the patch, which removes the only written to
variable "result".

cheers, Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


Download attachment "signature.asc" of type "application/pgp-signature" (261 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ