Re: [PATCH] tty:vt: Add check the return value of kzalloc to avoid oops

2019-09-25 Thread Xiaoming Ni
On 2019/9/23 11:50, Nicolas Pitre wrote: > On Sat, 21 Sep 2019, Xiaoming Ni wrote: > >> @ Nicolas Pitre >> Can I make a v2 patch based on your advice ? >> Or you will submit a patch for "GFP_WONTFAIL" yourself ? > > Here's a patch implementing what I had in mind. This is compile tested >

Re: [PATCH] tty:vt: Add check the return value of kzalloc to avoid oops

2019-09-22 Thread Nicolas Pitre
On Sat, 21 Sep 2019, Xiaoming Ni wrote: > @ Nicolas Pitre > Can I make a v2 patch based on your advice ? > Or you will submit a patch for "GFP_WONTFAIL" yourself ? Here's a patch implementing what I had in mind. This is compile tested only. - >8 Subject: [PATCH] mm: add __GFP_WONTFAIL and

Re: [PATCH] tty:vt: Add check the return value of kzalloc to avoid oops

2019-09-21 Thread Xiaoming Ni
On 2019/9/20 14:04, Greg KH wrote: > On Thu, Sep 19, 2019 at 10:56:15PM -0400, Nicolas Pitre wrote: >> On Thu, 19 Sep 2019, Greg KH wrote: >> >>> On Thu, Sep 19, 2019 at 05:18:15PM +0800, Xiaoming Ni wrote: Using kzalloc() to allocate memory in function con_init(), but not checking the

Re: [PATCH] tty:vt: Add check the return value of kzalloc to avoid oops

2019-09-20 Thread Greg KH
On Fri, Sep 20, 2019 at 02:29:49AM +, Nixiaoming wrote: > On 2019/9/19 17:30, Greg KH wrote: > > On Thu, Sep 19, 2019 at 05:18:15PM +0800, Xiaoming Ni wrote: > >> Using kzalloc() to allocate memory in function con_init(), but not > >> checking the return value, there is a risk of null pointer

Re: [PATCH] tty:vt: Add check the return value of kzalloc to avoid oops

2019-09-20 Thread Greg KH
On Thu, Sep 19, 2019 at 10:56:15PM -0400, Nicolas Pitre wrote: > On Thu, 19 Sep 2019, Greg KH wrote: > > > On Thu, Sep 19, 2019 at 05:18:15PM +0800, Xiaoming Ni wrote: > > > Using kzalloc() to allocate memory in function con_init(), but not > > > checking the return value, there is a risk of null

Re: [PATCH] tty:vt: Add check the return value of kzalloc to avoid oops

2019-09-19 Thread Nicolas Pitre
On Thu, 19 Sep 2019, Greg KH wrote: > On Thu, Sep 19, 2019 at 05:18:15PM +0800, Xiaoming Ni wrote: > > Using kzalloc() to allocate memory in function con_init(), but not > > checking the return value, there is a risk of null pointer references > > oops. > > > > Signed-off-by: Xiaoming Ni > >

RE: [PATCH] tty:vt: Add check the return value of kzalloc to avoid oops

2019-09-19 Thread Nixiaoming
On 2019/9/19 17:30, Greg KH wrote: > On Thu, Sep 19, 2019 at 05:18:15PM +0800, Xiaoming Ni wrote: >> Using kzalloc() to allocate memory in function con_init(), but not >> checking the return value, there is a risk of null pointer references >> oops. >> >> Signed-off-by: Xiaoming Ni > > We keep

Re: [PATCH] tty:vt: Add check the return value of kzalloc to avoid oops

2019-09-19 Thread Mikulas Patocka
On Thu, 19 Sep 2019, Greg KH wrote: > On Thu, Sep 19, 2019 at 05:18:15PM +0800, Xiaoming Ni wrote: > > Using kzalloc() to allocate memory in function con_init(), but not > > checking the return value, there is a risk of null pointer references > > oops. > > > > Signed-off-by: Xiaoming Ni >

Re: [PATCH] tty:vt: Add check the return value of kzalloc to avoid oops

2019-09-19 Thread Greg KH
On Thu, Sep 19, 2019 at 05:18:15PM +0800, Xiaoming Ni wrote: > Using kzalloc() to allocate memory in function con_init(), but not > checking the return value, there is a risk of null pointer references > oops. > > Signed-off-by: Xiaoming Ni We keep having this be "reported" :( > --- >