Commit 5bca1d0
net: datagram: fix data-races in datagram_poll()
datagram_poll() runs locklessly, we should add READ_ONCE()
annotations while reading sk->sk_err, sk->sk_shutdown and sk->sk_state.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://lore.kernel.org/r/20230509173131.3263780-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent cdc2e28 commit 5bca1d0
1 file changed
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
807 | 807 | | |
808 | 808 | | |
809 | 809 | | |
| 810 | + | |
810 | 811 | | |
811 | 812 | | |
812 | 813 | | |
813 | 814 | | |
814 | 815 | | |
815 | | - | |
| 816 | + | |
| 817 | + | |
816 | 818 | | |
817 | 819 | | |
818 | 820 | | |
819 | | - | |
| 821 | + | |
| 822 | + | |
820 | 823 | | |
821 | | - | |
| 824 | + | |
822 | 825 | | |
823 | 826 | | |
824 | 827 | | |
| |||
827 | 830 | | |
828 | 831 | | |
829 | 832 | | |
830 | | - | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
831 | 836 | | |
832 | 837 | | |
833 | | - | |
| 838 | + | |
834 | 839 | | |
835 | 840 | | |
836 | 841 | | |
| |||
0 commit comments