aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kernel/apic/io_apic.c
diff options
context:
space:
mode:
authorXin Long <[email protected]>2016-11-13 21:44:37 +0800
committerDavid S. Miller <[email protected]>2016-11-14 16:22:33 -0500
commit5bf35ddfee052d44f39ebaa395d87101c8918405 (patch)
tree0482e404f2e9307e27224e6ffc660c59d34325b9 /arch/x86/kernel/apic/io_apic.c
parent193f5122878c5d4d30dbfc9128affe58bdd18206 (diff)
sctp: change sk state only when it has assocs in sctp_shutdown
Now when users shutdown a sock with SEND_SHUTDOWN in sctp, even if this sock has no connection (assoc), sk state would be changed to SCTP_SS_CLOSING, which is not as we expect. Besides, after that if users try to listen on this sock, kernel could even panic when it dereference sctp_sk(sk)->bind_hash in sctp_inet_listen, as bind_hash is null when sock has no assoc. This patch is to move sk state change after checking sk assocs is not empty, and also merge these two if() conditions and reduce indent level. Fixes: d46e416c11c8 ("sctp: sctp should change socket state when shutdown is received") Reported-by: Andrey Konovalov <[email protected]> Tested-by: Andrey Konovalov <[email protected]> Signed-off-by: Xin Long <[email protected]> Acked-by: Marcelo Ricardo Leitner <[email protected]> Acked-by: Neil Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'arch/x86/kernel/apic/io_apic.c')
0 files changed, 0 insertions, 0 deletions