]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fix fuzz on 4.19 patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Oct 2019 06:18:38 +0000 (08:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Oct 2019 06:18:38 +0000 (08:18 +0200)
queue-4.19/cifs-use-cifsinodeinfo-open_file_lock-while-iteratin.patch

index 2457375893812dd5d218a0f8354a76927beb030f..710bd35094f8c078159fff39c5d18e1dbd3b1d17 100644 (file)
@@ -49,14 +49,12 @@ Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
 Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
 Signed-off-by: Steve French <stfrench@microsoft.com>
 ---
- fs/cifs/file.c | 27 +++++++++++----------------
+ fs/cifs/file.c |   27 +++++++++++----------------
  1 file changed, 11 insertions(+), 16 deletions(-)
 
-diff --git a/fs/cifs/file.c b/fs/cifs/file.c
-index 8703b5f26f452..26027d85ffd57 100644
 --- a/fs/cifs/file.c
 +++ b/fs/cifs/file.c
-@@ -1835,13 +1835,12 @@ struct cifsFileInfo *find_readable_file(struct cifsInodeInfo *cifs_inode,
+@@ -1841,13 +1841,12 @@ struct cifsFileInfo *find_readable_file(
  {
        struct cifsFileInfo *open_file = NULL;
        struct cifs_sb_info *cifs_sb = CIFS_SB(cifs_inode->vfs_inode.i_sb);
@@ -71,7 +69,7 @@ index 8703b5f26f452..26027d85ffd57 100644
        /* we could simply get the first_list_entry since write-only entries
           are always at the end of the list but since the first entry might
           have a close pending, we go through the whole list */
-@@ -1853,7 +1852,7 @@ struct cifsFileInfo *find_readable_file(struct cifsInodeInfo *cifs_inode,
+@@ -1859,7 +1858,7 @@ struct cifsFileInfo *find_readable_file(
                                /* found a good file */
                                /* lock it so it will not be closed on us */
                                cifsFileInfo_get(open_file);
@@ -80,7 +78,7 @@ index 8703b5f26f452..26027d85ffd57 100644
                                return open_file;
                        } /* else might as well continue, and look for
                             another, or simply have the caller reopen it
-@@ -1861,7 +1860,7 @@ struct cifsFileInfo *find_readable_file(struct cifsInodeInfo *cifs_inode,
+@@ -1867,7 +1866,7 @@ struct cifsFileInfo *find_readable_file(
                } else /* write only file */
                        break; /* write only files are last so must be done */
        }
@@ -89,7 +87,7 @@ index 8703b5f26f452..26027d85ffd57 100644
        return NULL;
  }
  
-@@ -1870,7 +1869,6 @@ struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *cifs_inode,
+@@ -1876,7 +1875,6 @@ struct cifsFileInfo *find_writable_file(
  {
        struct cifsFileInfo *open_file, *inv_file = NULL;
        struct cifs_sb_info *cifs_sb;
@@ -97,7 +95,7 @@ index 8703b5f26f452..26027d85ffd57 100644
        bool any_available = false;
        int rc;
        unsigned int refind = 0;
-@@ -1886,16 +1884,15 @@ struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *cifs_inode,
+@@ -1892,16 +1890,15 @@ struct cifsFileInfo *find_writable_file(
        }
  
        cifs_sb = CIFS_SB(cifs_inode->vfs_inode.i_sb);
@@ -116,7 +114,7 @@ index 8703b5f26f452..26027d85ffd57 100644
                return NULL;
        }
        list_for_each_entry(open_file, &cifs_inode->openFileList, flist) {
-@@ -1907,7 +1904,7 @@ struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *cifs_inode,
+@@ -1913,7 +1910,7 @@ refind_writable:
                        if (!open_file->invalidHandle) {
                                /* found a good writable file */
                                cifsFileInfo_get(open_file);
@@ -125,7 +123,7 @@ index 8703b5f26f452..26027d85ffd57 100644
                                return open_file;
                        } else {
                                if (!inv_file)
-@@ -1926,7 +1923,7 @@ struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *cifs_inode,
+@@ -1932,7 +1929,7 @@ refind_writable:
                cifsFileInfo_get(inv_file);
        }
  
@@ -134,7 +132,7 @@ index 8703b5f26f452..26027d85ffd57 100644
  
        if (inv_file) {
                rc = cifs_reopen_file(inv_file, false);
-@@ -1940,7 +1937,7 @@ struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *cifs_inode,
+@@ -1946,7 +1943,7 @@ refind_writable:
                        cifsFileInfo_put(inv_file);
                        ++refind;
                        inv_file = NULL;
@@ -143,7 +141,7 @@ index 8703b5f26f452..26027d85ffd57 100644
                        goto refind_writable;
                }
        }
-@@ -4001,17 +3998,15 @@ static int cifs_readpage(struct file *file, struct page *page)
+@@ -4007,17 +4004,15 @@ static int cifs_readpage(struct file *fi
  static int is_inode_writable(struct cifsInodeInfo *cifs_inode)
  {
        struct cifsFileInfo *open_file;
@@ -164,6 +162,3 @@ index 8703b5f26f452..26027d85ffd57 100644
        return 0;
  }
  
--- 
-2.20.1
-