@@ -31,23 +31,23 @@ struct bpf_nf_link {
31
31
#if IS_ENABLED (CONFIG_NF_DEFRAG_IPV4 ) || IS_ENABLED (CONFIG_NF_DEFRAG_IPV6 )
32
32
static const struct nf_defrag_hook *
33
33
get_proto_defrag_hook (struct bpf_nf_link * link ,
34
- const struct nf_defrag_hook __rcu * global_hook ,
34
+ const struct nf_defrag_hook __rcu * * ptr_global_hook ,
35
35
const char * mod )
36
36
{
37
37
const struct nf_defrag_hook * hook ;
38
38
int err ;
39
39
40
40
/* RCU protects us from races against module unloading */
41
41
rcu_read_lock ();
42
- hook = rcu_dereference (global_hook );
42
+ hook = rcu_dereference (* ptr_global_hook );
43
43
if (!hook ) {
44
44
rcu_read_unlock ();
45
45
err = request_module (mod );
46
46
if (err )
47
47
return ERR_PTR (err < 0 ? err : - EINVAL );
48
48
49
49
rcu_read_lock ();
50
- hook = rcu_dereference (global_hook );
50
+ hook = rcu_dereference (* ptr_global_hook );
51
51
}
52
52
53
53
if (hook && try_module_get (hook -> owner )) {
@@ -78,7 +78,7 @@ static int bpf_nf_enable_defrag(struct bpf_nf_link *link)
78
78
switch (link -> hook_ops .pf ) {
79
79
#if IS_ENABLED (CONFIG_NF_DEFRAG_IPV4 )
80
80
case NFPROTO_IPV4 :
81
- hook = get_proto_defrag_hook (link , nf_defrag_v4_hook , "nf_defrag_ipv4" );
81
+ hook = get_proto_defrag_hook (link , & nf_defrag_v4_hook , "nf_defrag_ipv4" );
82
82
if (IS_ERR (hook ))
83
83
return PTR_ERR (hook );
84
84
@@ -87,7 +87,7 @@ static int bpf_nf_enable_defrag(struct bpf_nf_link *link)
87
87
#endif
88
88
#if IS_ENABLED (CONFIG_NF_DEFRAG_IPV6 )
89
89
case NFPROTO_IPV6 :
90
- hook = get_proto_defrag_hook (link , nf_defrag_v6_hook , "nf_defrag_ipv6" );
90
+ hook = get_proto_defrag_hook (link , & nf_defrag_v6_hook , "nf_defrag_ipv6" );
91
91
if (IS_ERR (hook ))
92
92
return PTR_ERR (hook );
93
93
0 commit comments