Message ID | 20080930.190942.-1300537374.kouish@swc.toshiba.co.jp |
---|---|
State | Accepted |
Headers | show |
Kou Ishizaki wrote: > A mutex_unlock(&gang->aff_mutex) in spufs_create_context() is missing > in case spufs_context_open() fails. As a result, spu_create syscall > and spu_get_idle() may block. > > This patch adds the mutex_unlock. > > Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Acked-by: Andre Detsch <adetsch@br.ibm.com>
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 690ca7b..5c73b62 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c @@ -496,5 +496,7 @@ spufs_create_context(struct inode *inode, struct dentry *dentry, ret = spufs_context_open(dget(dentry), mntget(mnt)); if (ret < 0) { WARN_ON(spufs_rmdir(inode, dentry)); + if (affinity) + mutex_unlock(&gang->aff_mutex); mutex_unlock(&inode->i_mutex); spu_forget(SPUFS_I(dentry->d_inode)->i_ctx);
A mutex_unlock(&gang->aff_mutex) in spufs_create_context() is missing in case spufs_context_open() fails. As a result, spu_create syscall and spu_get_idle() may block. This patch adds the mutex_unlock. Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> --- arch/powerpc/platforms/cell/spufs/inode.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) goto out;