Re: [PATCH 2/3] relay: Fix race condition which occurs when reading across CPUs.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrea Righi
Date: Thursday, June 12, 2008 - 3:58 pm

Eduard - Gabriel Munteanu wrote:

If you just break here buf->rw_lock will be unlocked twice. Maybe a
better way is:
		if (desc->error < 0)
			goto out;
		...
  	} while (desc->count && ret);
	spin_unlock_irqrestore(&buf->rw_lock, flags);
out:
  	mutex_unlock(&filp->f_path.dentry->d_inode->i_mutex);

  	return desc->written;


-Andrea
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 2/3] relay: Fix race condition which occurs when re ..., Eduard - Gabriel Mun ..., (Thu Jun 12, 1:26 pm)
Re: [PATCH 2/3] relay: Fix race condition which occurs whe ..., Andrea Righi, (Thu Jun 12, 3:58 pm)
Re: [PATCH 2/3] relay: Fix race condition which occurs whe ..., Eduard - Gabriel Mun ..., (Thu Jun 12, 4:15 pm)