Re: [PATCH 1/2] powerpc/platforms/cell: Delete an error message for a failed memory allocation in three functions

2017-10-05 Thread Joe Perches
On Thu, 2017-10-05 at 22:29 +0200, Michal Suchánek wrote:
> I do not expect the kernel to generate a
> stack trace every time memory allocation fails. With all the hooks in
> the code it is hard to tell, though.

All [kv].alloc failures without __GFP_NOWARN call dump_stack()



Re: [PATCH 1/2] powerpc/platforms/cell: Delete an error message for a failed memory allocation in three functions

2017-10-05 Thread Michal Suchánek
On Thu, 5 Oct 2017 22:06:11 +0200 (CEST)
Julia Lawall  wrote:

> On Thu, 5 Oct 2017, Michal Suchánek wrote:
> 
> > Hello,
> >
> > On Thu, 5 Oct 2017 21:36:26 +0200
> > SF Markus Elfring  wrote:
> >  
> > > From: Markus Elfring 
> > > Date: Thu, 5 Oct 2017 21:04:30 +0200
> > >
> > > Omit extra messages for a memory allocation failure in these
> > > functions.  
> >
> > this is bogus. All these functions return -1 on any error. Until
> > they reflect the error in their return value (and it is properly
> > propagated to the user) there is no way to tell WTF failed without
> > the message.  
> 
> A backtrace will be generated.
> 

I do not see why it would. I do not expect the kernel to generate a
stack trace every time memory allocation fails. With all the hooks in
the code it is hard to tell, though.

Thanks

Michal


Re: [PATCH 1/2] powerpc/platforms/cell: Delete an error message for a failed memory allocation in three functions

2017-10-05 Thread Julia Lawall


On Thu, 5 Oct 2017, Michal Suchánek wrote:

> Hello,
>
> On Thu, 5 Oct 2017 21:36:26 +0200
> SF Markus Elfring  wrote:
>
> > From: Markus Elfring 
> > Date: Thu, 5 Oct 2017 21:04:30 +0200
> >
> > Omit extra messages for a memory allocation failure in these
> > functions.
>
> this is bogus. All these functions return -1 on any error. Until they
> reflect the error in their return value (and it is properly propagated
> to the user) there is no way to tell WTF failed without the message.

A backtrace will be generated.

julia

>
> >
> > This issue was detected by using the Coccinelle software.
> >
>
> ... which provides only a hint which should be evaluated by the user.
>
> Thanks
>
> Michal
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

Re: [PATCH 1/2] powerpc/platforms/cell: Delete an error message for a failed memory allocation in three functions

2017-10-05 Thread Michal Suchánek
Hello,

On Thu, 5 Oct 2017 21:36:26 +0200
SF Markus Elfring  wrote:

> From: Markus Elfring 
> Date: Thu, 5 Oct 2017 21:04:30 +0200
> 
> Omit extra messages for a memory allocation failure in these
> functions.

this is bogus. All these functions return -1 on any error. Until they
reflect the error in their return value (and it is properly propagated
to the user) there is no way to tell WTF failed without the message.

> 
> This issue was detected by using the Coccinelle software.
> 

... which provides only a hint which should be evaluated by the user.

Thanks

Michal