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:   Mon, 08 Jan 2018 14:40:43 +0100
From:   haver <haver@...ux.vnet.ibm.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     SF Markus Elfring <elfring@...rs.sourceforge.net>,
        kernel-janitors@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Guilherme G. Piccoli" <gpiccoli@...ux.vnet.ibm.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Jörg-Stephan Vogt <jsvogt@...ibm.com>,
        Michael Jung <MIJUNG@...ibm.com>,
        Michael Rüttger <michael@...ra.de>
Subject: Re: [PATCH 1/3] GenWQE: Delete an error message for a failed memory
 allocation in genwqe_user_vmap()

Hi Dan,

On 2018-01-08 14:23, Dan Carpenter wrote:
> On Mon, Jan 08, 2018 at 01:45:02PM +0100, haver wrote:
>> Hi Markus,
>> 
>> On 2018-01-08 10:41, SF Markus Elfring wrote:
>> > From: Markus Elfring <elfring@...rs.sourceforge.net>
>> > Date: Mon, 8 Jan 2018 09:37:23 +0100
>> >
>> > Omit an extra message for a memory allocation failure in this function.
>> >
>> > This issue was detected by using the Coccinelle software.
>> >
>> > Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
>> > ---
>> >  drivers/misc/genwqe/card_utils.c | 1 -
>> >  1 file changed, 1 deletion(-)
>> >
>> > diff --git a/drivers/misc/genwqe/card_utils.c
>> > b/drivers/misc/genwqe/card_utils.c
>> > index 8f2e6442d88b..55c389a9e7d7 100644
>> > --- a/drivers/misc/genwqe/card_utils.c
>> > +++ b/drivers/misc/genwqe/card_utils.c
>> > @@ -593,7 +593,6 @@ int genwqe_user_vmap(struct genwqe_dev *cd, struct
>> > dma_mapping *m, void *uaddr,
>> >  			       sizeof(struct page *) + sizeof(dma_addr_t),
>> >  			       GFP_KERNEL);
>> >  	if (!m->page_list) {
>> > -		dev_err(&pci_dev->dev, "err: alloc page_list failed\n");
>> 
>> Are there different printouts which cover this? I mean the debug 
>> printout is
>> not
>> appearing all the time, it must be enabled, if I remember correctly.
> 
> The kmalloc() error messages are enabled by default.  See warn_alloc().
> The stack trace from this specific call site is going to be very clear
> what went wrong.
> 

So it appears it is ok to be removed. Let's remove the redundant 
printout as suggested.

> 
>> So why
>> do
>> you suggest to remove it?
>> 
> 
> It's a checkpatch warning and a small memory savings.
> 
> regards,
> dan carpenter

Acked-by: Frank Haverkamp <haver@...ux.vnet.ibm.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ