Re: [PATCH net] sctp: change sk state only when it has assocs in sctp_shutdown

2016-11-14 Thread David Miller
From: Xin Long Date: Sun, 13 Nov 2016 21:44:37 +0800 > 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,

Re: [PATCH net] sctp: change sk state only when it has assocs in sctp_shutdown

2016-11-14 Thread Neil Horman
On Sun, Nov 13, 2016 at 09:44:37PM +0800, Xin Long wrote: > 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 so

Re: [PATCH net] sctp: change sk state only when it has assocs in sctp_shutdown

2016-11-14 Thread Marcelo Ricardo Leitner
On Sun, Nov 13, 2016 at 09:44:37PM +0800, Xin Long wrote: > 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 so

[PATCH net] sctp: change sk state only when it has assocs in sctp_shutdown

2016-11-13 Thread Xin Long
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_ha