]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fix up filelock patch on 5.4 and 4.19
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2024 13:04:43 +0000 (15:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2024 13:04:43 +0000 (15:04 +0200)
queue-4.19/filelock-remove-locks-reliably-when-fcntl-close-race-is-detected.patch
queue-4.19/series
queue-5.4/filelock-remove-locks-reliably-when-fcntl-close-race-is-detected.patch

index 658462f4fae2b99ac018814326790ca28e69534c..60c97d4da3f0a051abe4da8210eb4c70a87354cb 100644 (file)
@@ -41,7 +41,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
 --- a/fs/locks.c
 +++ b/fs/locks.c
-@@ -2428,8 +2428,9 @@ int fcntl_setlk64(unsigned int fd, struc
+@@ -2297,8 +2297,9 @@ int fcntl_setlk(unsigned int fd, struct
        error = do_lock_file_wait(filp, cmd, file_lock);
  
        /*
@@ -53,14 +53,14 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
         * unlocking though, or for OFD locks.
         */
        if (!error && file_lock->fl_type != F_UNLCK &&
-@@ -2443,9 +2444,7 @@ int fcntl_setlk64(unsigned int fd, struc
+@@ -2312,9 +2313,7 @@ int fcntl_setlk(unsigned int fd, struct
                f = fcheck(fd);
                spin_unlock(&current->files->file_lock);
                if (f != filp) {
 -                      file_lock->fl_type = F_UNLCK;
 -                      error = do_lock_file_wait(filp, cmd, file_lock);
 -                      WARN_ON_ONCE(error);
-+                      locks_remove_posix(filp, files);
++                      locks_remove_posix(filp, &current->files);
                        error = -EBADF;
                }
        }
index 507e4aa2bf1e2c323bbe30246e0196488874f4a0..9b6dfd94161017777917b52fbc298763dea62acc 100644 (file)
@@ -1,5 +1,4 @@
 gcc-plugins-rename-last_stmt-for-gcc-14.patch
-filelock-remove-locks-reliably-when-fcntl-close-race-is-detected.patch
 scsi-qedf-set-qed_slowpath_params-to-zero-before-use.patch
 acpi-ec-abort-address-space-access-upon-error.patch
 acpi-ec-avoid-returning-ae_ok-on-errors-in-address-s.patch
@@ -25,3 +24,4 @@ fs-better-handle-deep-ancestor-chains-in-is_subdir.patch
 spi-imx-don-t-expect-dma-for-i.mx-25-35-50-51-53-csp.patch
 selftests-vdso-fix-clang-build-errors-and-warnings.patch
 hfsplus-fix-uninit-value-in-copy_name.patch
+filelock-remove-locks-reliably-when-fcntl-close-race-is-detected.patch
index a33202b71e19918572eee3d46c26599f7abe0db5..f5f27daa3fe0308885814a89fb469fccb1cdd177 100644 (file)
@@ -60,7 +60,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -                      file_lock->fl_type = F_UNLCK;
 -                      error = do_lock_file_wait(filp, cmd, file_lock);
 -                      WARN_ON_ONCE(error);
-+                      locks_remove_posix(filp, files);
++                      locks_remove_posix(filp, &current->files);
                        error = -EBADF;
                }
        }