diff options
author | Dongxiao Xu <dongxiao.xu@intel.com> | 2009-05-31 14:43:42 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-19 11:00:55 -0700 |
commit | 72abd2288318a35fbf225b93a31d4623e3b8c872 (patch) | |
tree | 9ce193ab0c02b57cb2ef59009d4aafd98c3176df /drivers/staging/heci/heci_main.c | |
parent | 171df6381962b463e5aa8ff936eb3f995a56ce9e (diff) |
Staging: heci: fix spinlock order mess of device_lock and read_io_lock
In orginal code, the device_lock and read_io_lock is mess order when nested,
which may bring dead lock. This patch unify the spinlock order of device_lock
and read_io_lock. First acquire device_lock, then read_io_lock.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/heci/heci_main.c')
-rw-r--r-- | drivers/staging/heci/heci_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/heci/heci_main.c b/drivers/staging/heci/heci_main.c index daf1107cb8e..fb97428b457 100644 --- a/drivers/staging/heci/heci_main.c +++ b/drivers/staging/heci/heci_main.c @@ -954,8 +954,8 @@ static ssize_t heci_read(struct file *file, char __user *ubuf, goto out; } - spin_lock(&file_ext->read_io_lock); err = heci_start_read(dev, if_num, file_ext); + spin_lock(&file_ext->read_io_lock); if (err != 0 && err != -EBUSY) { DBG("heci start read failure with status = %d\n", err); spin_unlock(&file_ext->read_io_lock); |