[Devel] [PATCH RHEL7 COMMIT] fuse kio: Use dereferenced cs in cslist_destroy()

Konstantin Khorenko khorenko at virtuozzo.com
Fri Jun 8 19:29:59 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-693.21.1.vz7.50.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.21.1.vz7.50.7
------>
commit a9618cd934cdf2980fcb995d65cf42aaedc21f68
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Fri Jun 8 19:29:59 2018 +0300

    fuse kio: Use dereferenced cs in cslist_destroy()
    
    Do not dereference cs twice, since the second time it may be already NULL.
    
    Reported-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_map.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fuse/kio/pcs/pcs_map.c b/fs/fuse/kio/pcs/pcs_map.c
index f105eae8863a..b8bcda778959 100644
--- a/fs/fuse/kio/pcs/pcs_map.c
+++ b/fs/fuse/kio/pcs/pcs_map.c
@@ -74,7 +74,7 @@ static void cslist_destroy(struct pcs_cs_list * csl)
 			list_del_init(&cslink->link);
 			cs->nmaps--;
 		}
-		spin_unlock(&cslink->cs->lock);
+		spin_unlock(&cs->lock);
 	}
 	rcu_read_unlock();
 	kfree(csl);


More information about the Devel mailing list