lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 29 Mar 2019 09:39:40 -0700
From:   Joe Perches <joe@...ches.com>
To:     Greg KH <gregkh@...uxfoundation.org>,
        Oded Gabbay <oded.gabbay@...il.com>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] habanalabs: improve error messages

On Fri, 2019-03-29 at 17:29 +0100, Greg KH wrote:
> On Thu, Mar 28, 2019 at 09:13:13AM +0200, Oded Gabbay wrote:
> > This patch improves two error messages to help the user to
> > better understand what error occurred.
[]
> > diff --git a/drivers/misc/habanalabs/memory.c b/drivers/misc/habanalabs/memory.c
[]
> > @@ -109,7 +109,7 @@ static int alloc_device_memory(struct hl_ctx *ctx, struct hl_mem_in *args,
> >  							page_size);
> >  			if (!phys_pg_pack->pages[i]) {
> >  				dev_err(hdev->dev,
> > -					"ioctl failed to allocate page\n");
> > +					"Failed to allocate device memory (out of memory)\n");
> 
> No need for a message at all here, right?  The core should have already
> told you you had a problem.

I do not understand this code all that well, but I am uncertain
if all the possible pool allocation functions emit an OOM message
on failure.

Also, there is another pool allocation for the contiguous
allocation attempt that has a similar OOM in this function.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ