Gitweb:
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: e685b407d5fa266bc99563932b2336aff2489363
Parent: 92c3ba0359d38829318d3d6d93d32c1baee06c03
Author: Bob Peterson <rpeterso(a)redhat.com>
AuthorDate: Thu Mar 11 11:35:01 2010 -0600
Committer: Bob Peterson <rpeterso(a)redhat.com>
CommitterDate: Thu Mar 11 11:35:01 2010 -0600
Bug in GFS locking code leads to dos
This patch fixes the bug described in bug 570863.
Without the patch, a program may be written that uses
locking commands to crash the system.
rhbz#571298
---
gfs-kernel/src/gfs/ops_file.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/gfs-kernel/src/gfs/ops_file.c b/gfs-kernel/src/gfs/ops_file.c
index 440fbf6..150f328 100644
--- a/gfs-kernel/src/gfs/ops_file.c
+++ b/gfs-kernel/src/gfs/ops_file.c
@@ -1653,7 +1653,8 @@ gfs_lock(struct file *file, int cmd, struct file_lock *fl)
if (!(fl->fl_flags & FL_POSIX))
return -ENOLCK;
- if ((ip->i_di.di_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
+ if ((ip->i_di.di_mode & (S_ISGID | S_IXGRP)) == S_ISGID &&
+ fl->fl_type != F_UNLCK)
return -ENOLCK;
if (cmd == F_CANCELLK) {