No functional changes, these structures should be const.
Showing the changes to include (1 of 6 files). Show all
Unified · Split
| @@ -381,13 +381,13 @@ struct nf_nat_hook { · 380 unmodified lines | |||
| 381 | enum ip_conntrack_dir dir); | 381 | enum ip_conntrack_dir dir); |
| 382 | }; | 382 | }; |
| 383 | 383 | ||
| 384 | extern struct nf_nat_hook __rcu *nf_nat_hook; | 384 | extern const struct nf_nat_hook __rcu *nf_nat_hook; |
| 385 | 385 | ||
| 386 | static inline void | 386 | static inline void |
| 387 | nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, u_int8_t family) | 387 | nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, u_int8_t family) |
| 388 | { | 388 | { |
| 389 | #if IS_ENABLED(CONFIG_NF_NAT) | 389 | #if IS_ENABLED(CONFIG_NF_NAT) |
| 390 | struct nf_nat_hook *nat_hook; | 390 | const struct nf_nat_hook *nat_hook; |
| 391 | 391 | ||
| 392 | rcu_read_lock(); | 392 | rcu_read_lock(); |
| 393 | nat_hook = rcu_dereference(nf_nat_hook); | 393 | nat_hook = rcu_dereference(nf_nat_hook); |
| @@ -464,7 +464,7 @@ struct nf_ct_hook { · 70 unmodified lines | |||
| 464 | const struct sk_buff *); | 464 | const struct sk_buff *); |
| 465 | void (*attach)(struct sk_buff *nskb, const struct sk_buff *skb); | 465 | void (*attach)(struct sk_buff *nskb, const struct sk_buff *skb); |
| 466 | }; | 466 | }; |
| 467 | extern struct nf_ct_hook __rcu *nf_ct_hook; | 467 | extern const struct nf_ct_hook __rcu *nf_ct_hook; |
| 468 | 468 | ||
| 469 | struct nlattr; | 469 | struct nlattr; |
| 470 | 470 | ||
| @@ -479,7 +479,7 @@ struct nfnl_ct_hook { · 8 unmodified lines | |||
| 479 | void (*seq_adjust)(struct sk_buff *skb, struct nf_conn *ct, | 479 | void (*seq_adjust)(struct sk_buff *skb, struct nf_conn *ct, |
| 480 | enum ip_conntrack_info ctinfo, s32 off); | 480 | enum ip_conntrack_info ctinfo, s32 off); |
| 481 | }; | 481 | }; |
| 482 | extern struct nfnl_ct_hook __rcu *nfnl_ct_hook; | 482 | extern const struct nfnl_ct_hook __rcu *nfnl_ct_hook; |
| 483 | 483 | ||
| 484 | /** | 484 | /** |
| 485 | * nf_skb_duplicated - TEE target has sent a packet | 485 | * nf_skb_duplicated - TEE target has sent a packet |