Well, then you need to make sure ipprot->early_demux is read once in the
callers, like ip_rcv_finish(), otherwise compiler could read it twice
and we could deref a NULL pointer.

ipprot = rcu_dereference(inet_protos[protocol]);
if (ipprot && ipprot->early_demux) {
    ipprot->early_demux(skb);   // crash

Thanks Eric. I'll update this.

--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Reply via email to