|
@@ -543,7 +543,8 @@ struct dst_entry *inet_csk_route_req(const struct sock *sk,
|
|
struct ip_options_rcu *opt;
|
|
struct ip_options_rcu *opt;
|
|
struct rtable *rt;
|
|
struct rtable *rt;
|
|
|
|
|
|
- opt = rcu_dereference(ireq->ireq_opt);
|
|
|
|
|
|
+ opt = rcu_dereference_protected(ireq->ireq_opt,
|
|
|
|
+ refcount_read(&req->rsk_refcnt) > 0);
|
|
flowi4_init_output(fl4, ireq->ir_iif, ireq->ir_mark,
|
|
flowi4_init_output(fl4, ireq->ir_iif, ireq->ir_mark,
|
|
RT_CONN_FLAGS(sk), RT_SCOPE_UNIVERSE,
|
|
RT_CONN_FLAGS(sk), RT_SCOPE_UNIVERSE,
|
|
sk->sk_protocol, inet_sk_flowi_flags(sk),
|
|
sk->sk_protocol, inet_sk_flowi_flags(sk),
|