Re: [PATCH net] sctp: use __GFP_NOWARN for sctpw.fifo allocation

2017-08-07 Thread Xin Long
On Mon, Aug 7, 2017 at 11:39 AM, Marcelo Ricardo Leitner wrote: > On Sun, Aug 06, 2017 at 06:14:39PM +1200, Xin Long wrote: >> On Sun, Aug 6, 2017 at 5:08 AM, Marcelo Ricardo Leitner >> wrote: >> > On Sat, Aug 05, 2017 at 08:31:09PM +0800,

Re: [PATCH net] sctp: use __GFP_NOWARN for sctpw.fifo allocation

2017-08-06 Thread Marcelo Ricardo Leitner
On Sun, Aug 06, 2017 at 06:14:39PM +1200, Xin Long wrote: > On Sun, Aug 6, 2017 at 5:08 AM, Marcelo Ricardo Leitner > wrote: > > On Sat, Aug 05, 2017 at 08:31:09PM +0800, Xin Long wrote: > >> Chen Wei found a kernel call trace when modprobe sctp_probe with > >> bufsize

Re: [PATCH net] sctp: use __GFP_NOWARN for sctpw.fifo allocation

2017-08-06 Thread Xin Long
On Sun, Aug 6, 2017 at 5:08 AM, Marcelo Ricardo Leitner wrote: > On Sat, Aug 05, 2017 at 08:31:09PM +0800, Xin Long wrote: >> Chen Wei found a kernel call trace when modprobe sctp_probe with >> bufsize set with a huge value. >> >> It's because in sctpprobe_init when

Re: [PATCH net] sctp: use __GFP_NOWARN for sctpw.fifo allocation

2017-08-05 Thread Marcelo Ricardo Leitner
On Sat, Aug 05, 2017 at 08:31:09PM +0800, Xin Long wrote: > Chen Wei found a kernel call trace when modprobe sctp_probe with > bufsize set with a huge value. > > It's because in sctpprobe_init when alloc memory for sctpw.fifo, > the size is got from userspace. If it is too large, kernel will >

[PATCH net] sctp: use __GFP_NOWARN for sctpw.fifo allocation

2017-08-05 Thread Xin Long
Chen Wei found a kernel call trace when modprobe sctp_probe with bufsize set with a huge value. It's because in sctpprobe_init when alloc memory for sctpw.fifo, the size is got from userspace. If it is too large, kernel will fail and give a warning. As there will be a fallback allocation later,