Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 161346 Details for
Bug 252315
CIFS deadlocks in cifs_get_inode_info_unix
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch -- upstream patch backported for 4.6 beta kernel
0005-BZ-252315-CIFS-fix-deadlock-in-cifs_get_inode_inf.patch (text/plain), 1.96 KB, created by
Jeff Layton
on 2007-08-15 11:40:38 UTC
(
hide
)
Description:
patch -- upstream patch backported for 4.6 beta kernel
Filename:
MIME Type:
Creator:
Jeff Layton
Created:
2007-08-15 11:40:38 UTC
Size:
1.96 KB
patch
obsolete
>From 654bb6bed153fb474491fb407e6c59a1278b167d Mon Sep 17 00:00:00 2001 >From: Jeff Layton <jlayton@redhat.com> >Date: Wed, 15 Aug 2007 07:21:22 -0400 >Subject: [PATCH] BZ#252315: [CIFS] fix deadlock in cifs_get_inode_info_unix > >--- > fs/cifs/file.c | 33 +++++++++++++++++++++++---------- > 1 files changed, 23 insertions(+), 10 deletions(-) > >diff --git a/fs/cifs/file.c b/fs/cifs/file.c >index 26e5453..603cf48 100644 >--- a/fs/cifs/file.c >+++ b/fs/cifs/file.c >@@ -2047,6 +2047,25 @@ static int cifs_readpage(struct file *file, struct page *page) > return rc; > } > >+static int is_inode_writable(struct cifsInodeInfo *cifs_inode) >+{ >+ struct cifsFileInfo *open_file; >+ >+ read_lock(&GlobalSMBSeslock); >+ list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { >+ if (open_file->closePend) >+ continue; >+ if (open_file->pfile && >+ ((open_file->pfile->f_flags & O_RDWR) || >+ (open_file->pfile->f_flags & O_WRONLY))) { >+ read_unlock(&GlobalSMBSeslock); >+ return 1; >+ } >+ } >+ read_unlock(&GlobalSMBSeslock); >+ return 0; >+} >+ > /* We do not want to update the file size from server for inodes > open for write - to avoid races with writepage extending > the file - in the future we could consider allowing >@@ -2055,18 +2074,12 @@ static int cifs_readpage(struct file *file, struct page *page) > page caching in the current Linux kernel design */ > int is_size_safe_to_change(struct cifsInodeInfo *cifsInode, __u64 end_of_file) > { >- struct cifsFileInfo *open_file = NULL; >- >- if (cifsInode) >- open_file = find_writable_file(cifsInode); >- >- if(open_file) { >+ if (!cifsInode) >+ return 1; >+ if (is_inode_writable(cifsInode)) { >+ /* This inode is open for write at least once */ > struct cifs_sb_info *cifs_sb; > >- /* there is not actually a write pending so let >- this handle go free and allow it to >- be closable if needed */ >- atomic_dec(&open_file->wrtPending); > #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0) > cifs_sb = CIFS_SB(cifsInode->vfs_inode.i_sb); > #else >-- >1.5.2.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 252315
: 161346