cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] gfs2: fix flock panic issue
@ 2015-12-22  8:16 Junxiao Bi
  2015-12-22 14:14 ` Bob Peterson
  0 siblings, 1 reply; 2+ messages in thread
From: Junxiao Bi @ 2015-12-22  8:16 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Commit 4f6563677ae8 ("Move locks API users to locks_lock_inode_wait()")
move flock/posix lock indentify code to locks_lock_inode_wait(), but
missed to set fl_flags to FL_FLOCK which will cause kernel panic in
locks_lock_inode_wait().

Fixes: 4f6563677ae8 ("Move locks API users to locks_lock_inode_wait()")
Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
---
 fs/gfs2/file.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 860408053c95..62b85802af2c 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -1027,7 +1027,10 @@ static int do_flock(struct file *file, int cmd, struct file_lock *fl)
 		if (fl_gh->gh_state == state)
 			goto out;
 		locks_lock_file_wait(file,
-				     &(struct file_lock){.fl_type = F_UNLCK});
+					&(struct file_lock) {
+						.fl_type = F_UNLCK,
+						.fl_flags = FL_FLOCK
+					});
 		gfs2_glock_dq(fl_gh);
 		gfs2_holder_reinit(state, flags, fl_gh);
 	} else {
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Cluster-devel] [PATCH] gfs2: fix flock panic issue
  2015-12-22  8:16 [Cluster-devel] [PATCH] gfs2: fix flock panic issue Junxiao Bi
@ 2015-12-22 14:14 ` Bob Peterson
  0 siblings, 0 replies; 2+ messages in thread
From: Bob Peterson @ 2015-12-22 14:14 UTC (permalink / raw)
  To: cluster-devel.redhat.com

----- Original Message -----
> Commit 4f6563677ae8 ("Move locks API users to locks_lock_inode_wait()")
> move flock/posix lock indentify code to locks_lock_inode_wait(), but
> missed to set fl_flags to FL_FLOCK which will cause kernel panic in
> locks_lock_inode_wait().
> 
> Fixes: 4f6563677ae8 ("Move locks API users to locks_lock_inode_wait()")
> Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
> ---
>  fs/gfs2/file.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
> index 860408053c95..62b85802af2c 100644
> --- a/fs/gfs2/file.c
> +++ b/fs/gfs2/file.c
> @@ -1027,7 +1027,10 @@ static int do_flock(struct file *file, int cmd, struct
> file_lock *fl)
>  		if (fl_gh->gh_state == state)
>  			goto out;
>  		locks_lock_file_wait(file,
> -				     &(struct file_lock){.fl_type = F_UNLCK});
> +					&(struct file_lock) {
> +						.fl_type = F_UNLCK,
> +						.fl_flags = FL_FLOCK
> +					});
>  		gfs2_glock_dq(fl_gh);
>  		gfs2_holder_reinit(state, flags, fl_gh);
>  	} else {
> --
> 1.7.9.5
> 
> 

Hi,

Thanks. This is now applied to the for-next branch of the linux-gfs2 tree:
https://git.kernel.org/cgit/linux/kernel/git/gfs2/linux-gfs2.git/commit/fs/gfs2?h=for-next&id=a93a99838248bdab49db2eaac00236847670bc7f

Regards,

Bob Peterson
Red Hat File Systems



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-22 14:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-22  8:16 [Cluster-devel] [PATCH] gfs2: fix flock panic issue Junxiao Bi
2015-12-22 14:14 ` Bob Peterson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).