]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: lustre: ptlrpc: correct use of list_add_tail()
authorJohn L. Hammond <john.hammond@intel.com>
Wed, 26 Jul 2017 15:22:24 +0000 (11:22 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 30 Jul 2017 15:08:31 +0000 (08:08 -0700)
With people starting to test security enabled ptlrpc
a list_del corruption was reported. The reason for
this error was tracked down to wrong arguments to
list_add_tail(). In sptlrpc_gc_add_sec() swap the
arguments to list_add_tail() so that it does what
we meant it to do.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8270
Reviewed-on: http://review.whamcloud.com/20784
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ptlrpc/sec_gc.c

index 8ffd000eafacf3d16041a856ab33f358dc388eb0..026bec7539fd2f864855d05cdfefe84f82725a5c 100644 (file)
@@ -66,7 +66,7 @@ void sptlrpc_gc_add_sec(struct ptlrpc_sec *sec)
        sec->ps_gc_next = ktime_get_real_seconds() + sec->ps_gc_interval;
 
        spin_lock(&sec_gc_list_lock);
-       list_add_tail(&sec_gc_list, &sec->ps_gc_list);
+       list_add_tail(&sec->ps_gc_list, &sec_gc_list);
        spin_unlock(&sec_gc_list_lock);
 
        CDEBUG(D_SEC, "added sec %p(%s)\n", sec, sec->ps_policy->sp_name);