Skip to content
Commit b7601c7a authored by Atsushi Nemoto's avatar Atsushi Nemoto Committed by Paul Gortmaker
Browse files

i2c: altera: Fix race between xfer_msg and isr thread



commit 5d4c7977 upstream.

Use a mutex to protect access to idev->msg_len, idev->buf, etc. which
are modified by both altr_i2c_xfer_msg() and altr_i2c_isr().

This is the minimal fix for easy backporting. A cleanup to remove the
spinlock will be added later.

Signed-off-by: default avatarAtsushi Nemoto <atsushi.nemoto@sord.co.jp>
Acked-by: default avatarThor Thayer <thor.thayer@linux.intel.com>
[wsa: updated commit message]
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 3d51f52d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment