]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/xfrm/xfrm_state.c
xfrm: fix rcu usage in xfrm_get_type_offload
[mirror_ubuntu-bionic-kernel.git] / net / xfrm / xfrm_state.c
index 1e80f68e226665e5393dd07eeeaaf9fa7090ca9b..42995741263386852b61a6a72a23669f4d134b5b 100644 (file)
@@ -313,13 +313,14 @@ retry:
        if ((type && !try_module_get(type->owner)))
                type = NULL;
 
+       rcu_read_unlock();
+
        if (!type && try_load) {
                request_module("xfrm-offload-%d-%d", family, proto);
                try_load = 0;
                goto retry;
        }
 
-       rcu_read_unlock();
        return type;
 }