hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/net/packet/diag.c
....@@ -23,9 +23,9 @@
2323 pinfo.pdi_flags = 0;
2424 if (po->running)
2525 pinfo.pdi_flags |= PDI_RUNNING;
26
- if (po->auxdata)
26
+ if (packet_sock_flag(po, PACKET_SOCK_AUXDATA))
2727 pinfo.pdi_flags |= PDI_AUXDATA;
28
- if (po->origdev)
28
+ if (packet_sock_flag(po, PACKET_SOCK_ORIGDEV))
2929 pinfo.pdi_flags |= PDI_ORIGDEV;
3030 if (po->has_vnet_hdr)
3131 pinfo.pdi_flags |= PDI_VNETHDR;
....@@ -143,7 +143,7 @@
143143 rp = nlmsg_data(nlh);
144144 rp->pdiag_family = AF_PACKET;
145145 rp->pdiag_type = sk->sk_type;
146
- rp->pdiag_num = ntohs(po->num);
146
+ rp->pdiag_num = ntohs(READ_ONCE(po->num));
147147 rp->pdiag_ino = sk_ino;
148148 sock_diag_save_cookie(sk, rp->pdiag_cookie);
149149