linux-stable/fs
xuejiufei 276533d5ac ocfs2/dlm: ignore cleaning the migration mle that is inuse
commit bef5502de0 upstream.

We have found that migration source will trigger a BUG that the refcount
of mle is already zero before put when the target is down during
migration.  The situation is as follows:

dlm_migrate_lockres
  dlm_add_migration_mle
  dlm_mark_lockres_migrating
  dlm_get_mle_inuse
  <<<<<< Now the refcount of the mle is 2.
  dlm_send_one_lockres and wait for the target to become the
  new master.
  <<<<<< o2hb detect the target down and clean the migration
  mle. Now the refcount is 1.

dlm_migrate_lockres woken, and put the mle twice when found the target
goes down which trigger the BUG with the following message:

  "ERROR: bad mle: ".

Signed-off-by: Jiufei Xue <xuejiufei@huawei.com>
Reviewed-by: Joseph Qi <joseph.qi@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Willy Tarreau <w@1wt.eu>
2016-03-12 14:25:43 +01:00
..
9p 9p: Skip check for mandatory locks when unlocking 2010-04-26 07:41:29 -07:00
adfs adfs: remove redundant test on unsigned 2009-09-24 07:21:05 -07:00
affs fix affs parse_options() 2010-02-09 04:50:48 -08:00
afs FS-Cache: Handle pages pending storage that get evicted under OOM conditions 2009-11-19 18:11:35 +00:00
autofs trivial: remove unnecessary semicolons 2009-09-21 15:14:58 +02:00
autofs4 autofs: work around unhappy compat problem on x86-64 2012-03-04 09:49:22 -08:00
befs befs: Validate length of long symbolic links. 2011-08-29 14:08:05 -07:00
bfs Fix failure exits in bfs_fill_super() 2010-02-09 04:50:46 -08:00
btrfs btrfs: use rcu_barrier() to wait for bdev puts at unmount 2013-06-10 11:43:22 +02:00
cachefiles CacheFiles: Fix error handling in cachefiles_determine_cache_security() 2010-05-26 14:29:20 -07:00
cifs fs/cifs/cifs_dfs_ref.c: fix potential memory leakage 2013-06-10 11:43:20 +02:00
coda headers: remove sched.h from poll.h 2009-10-04 15:05:10 -07:00
configfs writeback: add name to backing_dev_info 2009-09-11 09:20:26 +02:00
cramfs fs/cramfs: return f_fsid for statfs(2) 2009-04-02 19:05:08 -07:00
debugfs debugfs: fix create mutex racy fops and private data 2009-12-18 14:04:16 -08:00
devpts devpts_get_tty() should validate inode 2009-12-18 14:04:15 -08:00
dlm dlm: send reply before bast 2010-08-13 13:20:21 -07:00
ecryptfs eCryptfs: Remove buggy and unnecessary write in file name decode routine 2015-09-18 13:51:53 +02:00
efs get rid of BKL in fs/efs 2009-06-17 00:36:36 -04:00
exofs exofs: confusion between kmap() and kmap_atomic() api 2010-07-05 11:10:47 -07:00
exportfs Merge branch 'next' into for-linus 2008-12-25 11:40:09 +11:00
ext2 ext2: Fix link count corruption under heavy link+rename load 2011-03-07 15:17:54 -08:00
ext3 ext3: Fix fdatasync() for files with only i_size changes 2012-10-07 23:40:58 +02:00
ext4 ext4: Fix handling of extended tv_sec 2016-01-29 22:12:46 +01:00
fat NLS: improve UTF8 -> UTF16 string conversion routine 2013-06-10 11:43:21 +02:00
freevxfs headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00
fscache fs/fscache/stats.c: fix memory leak 2013-06-10 11:43:08 +02:00
fuse fuse: break infinite loop in fuse_fill_write_pages() 2016-01-29 22:12:44 +01:00
gfs2 GFS2: BUG in gfs2_adjust_quota 2011-05-09 15:55:12 -07:00
hfs hfs: fix B-tree corruption after insertion at position 0 2015-12-06 00:49:11 +01:00
hfsplus hfs,hfsplus: cache pages correctly between bnode_create and bnode_free 2015-12-06 00:49:10 +01:00
hostfs hostfs: set maximum filesize in superblock for proper LFS support 2009-06-30 18:56:03 -07:00
hpfs headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00
hppfs hppfs: hppfs_read_file() may return -ERROR 2009-04-02 19:04:53 -07:00
hugetlbfs hugepages: fix use after free bug in "quota" handling 2012-10-07 23:37:27 +02:00
isofs isofs: Fix unchecked printing of ER records 2015-05-24 10:10:41 +02:00
jbd jbd: Fix lock ordering bug in journal_unmap_buffer() 2013-06-10 11:43:10 +02:00
jbd2 jbd2: fix r_count overflows leading to buffer overflow in journal recovery 2015-09-18 13:52:01 +02:00
jffs2 jffs2: Fix long-standing bug with symlink garbage collection. 2009-12-18 14:05:52 -08:00
jfs jfs: don't allow os2 xattr namespace overlap with others 2010-08-13 13:19:48 -07:00
lockd lockd: Try to reconnect if statd has moved 2015-05-24 10:10:54 +02:00
minix V3 minixfs: add missing directory type checking 2009-09-23 07:39:57 -07:00
ncpfs const: mark struct vm_struct_operations 2009-09-27 11:39:25 -07:00
nfs nfs: if we have no valid attrs, then don't declare the attribute cache valid 2016-01-29 22:12:46 +01:00
nfs_common SUNRPC: nfsacl_encode/nfsacl_decode should be exported as GPL-only 2008-12-23 15:21:32 -05:00
nfsd Revert "nfsd: correctly handle return value from nfsd_map_name_to_*" 2014-11-23 10:55:44 +01:00
nilfs2 nilfs2: fix NULL pointer dereference in nilfs_load_super_block() 2012-10-07 23:37:33 +02:00
nls NLS: improve UTF8 -> UTF16 string conversion routine 2013-06-10 11:43:21 +02:00
notify inotify: fix inotify oneshot support 2010-09-26 17:21:38 -07:00
ntfs Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2009-09-24 08:32:11 -07:00
ocfs2 ocfs2/dlm: ignore cleaning the migration mle that is inuse 2016-03-12 14:25:43 +01:00
omfs fs, omfs: add NULL terminator in the end up the token list 2015-09-18 13:52:03 +02:00
openpromfs zero i_uid/i_gid on inode allocation 2009-01-05 11:54:28 -05:00
partitions block: do not pass disk names as format strings 2014-05-19 07:53:26 +02:00
proc pagemap: hide physical addresses from non-privileged users 2015-12-06 00:49:10 +01:00
qnx4 qnx4: remove write support 2009-09-23 07:39:30 -07:00
quota quota: Don't write quota info in dquot_commit() 2011-04-14 16:53:30 -07:00
ramfs ramfs: fix memleak on no-mmu arch 2011-04-22 08:44:15 -07:00
reiserfs reiserfs: Force inode evictions before umount to avoid crash 2012-01-12 11:40:03 -08:00
romfs fix leak in romfs_fill_super() 2010-02-09 04:50:47 -08:00
smbfs fs: Make unload_nls() NULL pointer safe 2009-09-24 07:47:42 -04:00
squashfs Squashfs: handle corruption of directory structure 2011-04-14 16:53:44 -07:00
sysfs sysfs: sysfs_pathname/sysfs_add_one: Use strlcat() instead of strcat() 2013-06-10 11:43:08 +02:00
sysv fix sysvfs symlinks 2016-01-29 22:12:45 +01:00
ubifs UBIFS: fix memory leak on error path 2011-06-23 15:24:05 -07:00
udf udf: Check output buffer length when converting name to CS0 2016-03-12 14:25:43 +01:00
ufs ufs: sector_t cannot be negative 2009-06-18 13:03:46 -07:00
xfs xfs: Fix xfs_attr_leafblock definition 2015-12-06 00:49:08 +01:00
aio.c vfs: make AIO use the proper rw_verify_area() area helpers 2016-03-12 14:25:41 +01:00
anon_inodes.c headers: remove sched.h from poll.h 2009-10-04 15:05:10 -07:00
attr.c truncate: new helpers 2009-09-24 08:41:47 -04:00
bad_inode.c kill ->dir_notify() 2008-12-31 18:07:43 -05:00
binfmt_aout.c Split 'flush_old_exec' into two functions 2010-02-09 04:50:49 -08:00
binfmt_elf_fdpic.c Split 'flush_old_exec' into two functions 2010-02-09 04:50:49 -08:00
binfmt_elf.c binfmt_elf: Don't clobber passed executable's file header 2015-12-06 00:49:18 +01:00
binfmt_em86.c exec: use -ELOOP for max recursion depth 2013-06-10 11:42:18 +02:00
binfmt_flat.c Split 'flush_old_exec' into two functions 2010-02-09 04:50:49 -08:00
binfmt_misc.c exec: use -ELOOP for max recursion depth 2013-06-10 11:42:18 +02:00
binfmt_script.c exec: use -ELOOP for max recursion depth 2013-06-10 11:42:18 +02:00
binfmt_som.c Split 'flush_old_exec' into two functions 2010-02-09 04:50:49 -08:00
bio-integrity.c block: fix bugs in bio-integrity mempool usage 2010-02-09 04:50:58 -08:00
bio.c bio: take care not overflow page count when mapping/copying user data 2010-12-09 13:26:52 -08:00
block_dev.c Revert "block: rescan partitions on invalidated devices on -ENOMEDIA too" 2011-08-08 10:23:15 -07:00
buffer.c Merge branch 'writeback' of git://git.kernel.dk/linux-2.6-block 2009-09-25 09:27:30 -07:00
char_dev.c char: Mark /dev/zero and /dev/kmem as not capable of writeback 2010-09-26 17:21:26 -07:00
compat_binfmt_elf.c
compat_ioctl.c net: fix info leak in compat dev_ifconf() 2013-06-10 11:43:30 +02:00
compat.c vfs: missed source of ->f_pos races 2012-10-07 23:38:20 +02:00
dcache.c dcache: Handle escaped paths in prepend_path 2015-12-06 00:49:00 +01:00
dcookies.c oprofile, dcookies: Fix possible circular locking dependency 2011-06-23 15:24:07 -07:00
direct-io.c block: Do away with the notion of hardsect_size 2009-05-22 23:22:54 +02:00
drop_caches.c sysctl: remove "struct file *" argument of ->proc_handler 2009-09-24 07:21:04 -07:00
eventfd.c anonfd: split interface into file creation and install 2009-09-23 07:39:29 -07:00
eventpoll.c epoll: prevent missed events on EPOLL_CTL_MOD 2013-06-10 11:43:07 +02:00
exec.c fs: take i_mutex during prepare_binprm for set[ug]id executables 2015-05-24 10:10:44 +02:00
fcntl.c Fix race in tty_fasync() properly 2010-02-23 07:37:44 -08:00
fifo.c
file_table.c CRED: Fix kernel panic upon security_file_alloc() failure. 2011-03-02 09:46:38 -05:00
file.c headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
filesystems.c fs: Mark get_filesystem_list() as __init function. 2009-04-20 23:02:52 -04:00
fs_struct.c Get rid of indirect include of fs_struct.h 2009-03-31 23:00:27 -04:00
fs-writeback.c writeback: disable periodic old data writeback for !dirty_writeback_centisecs 2010-07-05 11:10:45 -07:00
generic_acl.c New helper - current_umask() 2009-03-31 23:00:26 -04:00
inode.c mm: prevent concurrent unmap_mapping_range() on the same inode 2011-07-13 05:29:27 +02:00
internal.h fs: fix overflow in sys_mount() for in-kernel calls 2009-09-24 08:40:15 -04:00
ioctl.c __generic_block_fiemap(): fix for files bigger than 4GB 2009-11-12 07:26:01 -08:00
ioprio.c [CVE-2009-0029] System call wrappers part 28 2009-01-14 14:15:30 +01:00
Kconfig powerpc: Cleanup Kconfig selection of hugetlbfs support 2009-10-30 15:03:54 +11:00
Kconfig.binfmt CORE_DUMP_DEFAULT_ELF_HEADERS depends on ELF_CORE 2009-01-09 16:54:41 -08:00
libfs.c wrong type for 'magic' argument in simple_fill_super() 2010-07-05 11:11:12 -07:00
locks.c locks: fix unlock when fcntl_setlk races with a close 2016-03-12 14:25:40 +01:00
Makefile nilfs2: update makefile and Kconfig 2009-04-07 08:31:16 -07:00
mbcache.c
mpage.c ext4: Properly initialize the buffer_head state 2009-05-13 15:13:42 -04:00
namei.c vfs: Test for and handle paths that are unreachable from their mnt_root 2015-12-06 00:49:00 +01:00
namespace.c vfs: add NOFOLLOW flag to umount(2) 2010-07-05 11:11:15 -07:00
nfsctl.c [CVE-2009-0029] System call wrappers part 27 2009-01-14 14:15:29 +01:00
no-block.c
open.c fs: change sys_truncate length parameter type 2009-09-23 09:21:05 -07:00
pipe.c pipe: Fix buffer offset after partially failed read 2016-03-12 14:25:41 +01:00
pnode.c
pnode.h
posix_acl.c CRED: Wrap task credential accesses in the filesystem subsystem 2008-11-14 10:39:05 +11:00
read_write.c readv/writev: do the same MAX_RW_COUNT truncation that read/write does 2016-03-12 14:25:41 +01:00
read_write.h
readdir.c [CVE-2009-0029] System call wrappers part 32 2009-01-14 14:15:31 +01:00
select.c headers: remove sched.h from poll.h 2009-10-04 15:05:10 -07:00
seq_file.c vfs: seq_file: add helpers for data filling 2009-09-24 07:47:35 -04:00
signalfd.c epoll: ep_unregister_pollwait() can use the freed pwq->whead 2012-10-07 23:41:06 +02:00
splice.c vfs: Avoid softlockups with sendfile(2) 2016-01-29 22:12:45 +01:00
stack.c
stat.c Add unlocked version of inode_add_bytes() function 2010-01-06 15:05:01 -08:00
super.c vfs: get_sb_single() - do not pass options twice 2010-01-28 15:00:47 -08:00
sync.c fs/buffer.c: clean up EXPORT* macros 2009-09-23 07:39:29 -07:00
timerfd.c timerfd: add flags check 2009-02-18 15:37:53 -08:00
utimes.c [CVE-2009-0029] System call wrappers part 30 2009-01-14 14:15:30 +01:00
xattr_acl.c
xattr.c VFS: Factor out part of vfs_setxattr so it can be called from the SELinux hook for inode_setsecctx. 2009-09-10 10:11:22 +10:00