diff options
author | Sachin Prabhu <sprabhu@redhat.com> | 2016-07-07 21:28:27 +0100 |
---|---|---|
committer | Sasha Levin <alexander.levin@verizon.com> | 2016-08-17 12:58:31 -0400 |
commit | 9b01eafbc9514e71056e0a1a4714606385a431a4 (patch) | |
tree | 85d627b864ec3fbd2c73783874fc530d6e992d07 /fs/hostfs | |
parent | bdf3214616dd38384c9716ce96a18b779e233224 (diff) |
cifs: Check for existing directory when opening file with O_CREAT
[ Upstream commit 8d9535b6efd86e6c07da59f97e68f44efb7fe080 ]
When opening a file with O_CREAT flag, check to see if the file opened
is an existing directory.
This prevents the directory from being opened which subsequently causes
a crash when the close function for directories cifs_closedir() is called
which frees up the file->private_data memory while the file is still
listed on the open file list for the tcon.
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
CC: Stable <stable@vger.kernel.org>
Reported-by: Xiaoli Feng <xifeng@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Diffstat (limited to 'fs/hostfs')
0 files changed, 0 insertions, 0 deletions