.. | .. |
---|
25 | 25 | void sock_diag_register_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh)); |
---|
26 | 26 | void sock_diag_unregister_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh)); |
---|
27 | 27 | |
---|
28 | | -u64 sock_gen_cookie(struct sock *sk); |
---|
| 28 | +u64 __sock_gen_cookie(struct sock *sk); |
---|
| 29 | + |
---|
| 30 | +static inline u64 sock_gen_cookie(struct sock *sk) |
---|
| 31 | +{ |
---|
| 32 | + u64 cookie; |
---|
| 33 | + |
---|
| 34 | + preempt_disable(); |
---|
| 35 | + cookie = __sock_gen_cookie(sk); |
---|
| 36 | + preempt_enable(); |
---|
| 37 | + |
---|
| 38 | + return cookie; |
---|
| 39 | +} |
---|
| 40 | + |
---|
29 | 41 | int sock_diag_check_cookie(struct sock *sk, const __u32 *cookie); |
---|
30 | 42 | void sock_diag_save_cookie(struct sock *sk, __u32 *cookie); |
---|
31 | 43 | |
---|