Re: [PATCH net] sctp: sctp should release assoc when sctp_make_abort_user return NULL in sctp_close

2015-12-21 Thread Marcelo Ricardo Leitner
Em 21-12-2015 07:56, Xin Long escreveu: On Sat, Dec 19, 2015 at 12:23 AM, Marcelo Ricardo Leitner wrote: On Fri, Dec 18, 2015 at 09:08:46AM -0500, Vlad Yasevich wrote: On 12/17/2015 02:33 PM, Vlad Yasevich wrote: On 12/17/2015 02:01 PM, Marcelo Ricardo Leitner wrote: ... There is a check on

Re: [PATCH net] sctp: sctp should release assoc when sctp_make_abort_user return NULL in sctp_close

2015-12-21 Thread Xin Long
On Sat, Dec 19, 2015 at 12:23 AM, Marcelo Ricardo Leitner wrote: > On Fri, Dec 18, 2015 at 09:08:46AM -0500, Vlad Yasevich wrote: >> On 12/17/2015 02:33 PM, Vlad Yasevich wrote: >> > On 12/17/2015 02:01 PM, Marcelo Ricardo Leitner wrote: > ... >> >> There is a check on sctp_cmd_delete_tcb() that a

Re: [PATCH net] sctp: sctp should release assoc when sctp_make_abort_user return NULL in sctp_close

2015-12-18 Thread Marcelo Ricardo Leitner
On Fri, Dec 18, 2015 at 09:08:46AM -0500, Vlad Yasevich wrote: > On 12/17/2015 02:33 PM, Vlad Yasevich wrote: > > On 12/17/2015 02:01 PM, Marcelo Ricardo Leitner wrote: ... > >> There is a check on sctp_cmd_delete_tcb() that avoids calling that on temp > >> assocs on > >> listening sockets, but th

Re: [PATCH net] sctp: sctp should release assoc when sctp_make_abort_user return NULL in sctp_close

2015-12-18 Thread Vlad Yasevich
On 12/17/2015 02:33 PM, Vlad Yasevich wrote: > On 12/17/2015 02:01 PM, Marcelo Ricardo Leitner wrote: >> Em 17-12-2015 16:29, Vlad Yasevich escreveu: >>> On 12/17/2015 09:30 AM, Xin Long wrote: In sctp_close, sctp_make_abort_user may return NULL because of memory allocation failure. If th

Re: [PATCH net] sctp: sctp should release assoc when sctp_make_abort_user return NULL in sctp_close

2015-12-17 Thread Vlad Yasevich
On 12/17/2015 02:01 PM, Marcelo Ricardo Leitner wrote: > Em 17-12-2015 16:29, Vlad Yasevich escreveu: >> On 12/17/2015 09:30 AM, Xin Long wrote: >>> In sctp_close, sctp_make_abort_user may return NULL because of memory >>> allocation failure. If this happens, it will bypass any state change >>> and

Re: [PATCH net] sctp: sctp should release assoc when sctp_make_abort_user return NULL in sctp_close

2015-12-17 Thread Marcelo Ricardo Leitner
Em 17-12-2015 16:29, Vlad Yasevich escreveu: On 12/17/2015 09:30 AM, Xin Long wrote: In sctp_close, sctp_make_abort_user may return NULL because of memory allocation failure. If this happens, it will bypass any state change and never free the assoc. The assoc has no chance to be freed and it wil

Re: [PATCH net] sctp: sctp should release assoc when sctp_make_abort_user return NULL in sctp_close

2015-12-17 Thread Vlad Yasevich
On 12/17/2015 09:30 AM, Xin Long wrote: > In sctp_close, sctp_make_abort_user may return NULL because of memory > allocation failure. If this happens, it will bypass any state change > and never free the assoc. The assoc has no chance to be freed and it > will be kept in memory with the state it ha

[PATCH net] sctp: sctp should release assoc when sctp_make_abort_user return NULL in sctp_close

2015-12-17 Thread Xin Long
In sctp_close, sctp_make_abort_user may return NULL because of memory allocation failure. If this happens, it will bypass any state change and never free the assoc. The assoc has no chance to be freed and it will be kept in memory with the state it had even after the socket is closed by sctp_close(