diff options
author | Tejun Heo <tj@kernel.org> | 2014-04-02 16:40:52 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-04-16 11:54:40 -0700 |
commit | 4afddd60a770560d370d6f85c5aef57c16bf7502 (patch) | |
tree | 43ef62593beb12321088ddae46375ffae49d402f /kernel/irq | |
parent | a2a4dc494a7b7135f460e38e788c4a58f65e4ac3 (diff) | |
download | op-kernel-dev-4afddd60a770560d370d6f85c5aef57c16bf7502.zip op-kernel-dev-4afddd60a770560d370d6f85c5aef57c16bf7502.tar.gz |
kernfs: protect lazy kernfs_iattrs allocation with mutex
kernfs_iattrs is allocated lazily when operations which require it
take place; unfortunately, the lazy allocation and returning weren't
properly synchronized and when there are multiple concurrent
operations, it might end up returning kernfs_iattrs which hasn't
finished initialization yet or different copies to different callers.
Fix it by synchronizing with a mutex. This can be smarter with memory
barriers but let's go there if it actually turns out to be necessary.
Signed-off-by: Tejun Heo <tj@kernel.org>
Link: http://lkml.kernel.org/g/533ABA32.9080602@oracle.com
Reported-by: Sasha Levin <sasha.levin@oracle.com>
Cc: stable@vger.kernel.org # 3.14
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/irq')
0 files changed, 0 insertions, 0 deletions