[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPDOMVhV3eKJ78-d_F_TTFjM+GDEdqpMSMFEQ8jOEnrbBchHqw@mail.gmail.com>
Date: Sun, 15 Jun 2014 23:28:50 -0400
From: Nick Krause <xerofoify@...il.com>
To: David Miller <davem@...emloft.net>
Cc: andriy.shevchenko@...ux.intel.com, dvhart@...ux.intel.com,
jeffrey.t.kirsher@...el.com, ast@...mgrid.com, dborkman@...hat.com,
bhutchings@...arflare.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Missing return check against Null for return value of netdev_alloc_dev_skb()
Fair enjoy I was wondering if it fails I can run a goto statement and
then free the memory for the tx as needed.
Cheers Nick
P.S. That was really stupid I didn't think that through at all :)
On Sun, Jun 15, 2014 at 10:26 PM, David Miller <davem@...emloft.net> wrote:
> From: Nick Krause <xerofoify@...il.com>
> Date: Sun, 15 Jun 2014 16:27:23 -0400
>
>> From 62b0d77a1430f74b7f5c008c5e8bec11604b33b0 Mon Sep 17 00:00:00 2001
>> From: Nick <xerofoify@...il.com>
>> Date: Sun, 15 Jun 2014 16:16:14 -0400
>> Subject: [PATCHv2] Fixes return logic of function of pch_gbe_alloc_tx_buffers()
>> Here is the fixed patch changed return type of function to int in
>> order to use return -ENOMEM as with the function above it , seems to
>> fit , otherwise returns 0.
>> Report if it breaks anything related to this driver.
>> Signed-off-by: Nick <xerofoify@...il.com>
>
> Nobody is checking the return value, you can't just change the function to
> return an error code, you have to make the caller act upon it appropriately
> as well.
>
> I'm very much not confident that you are willing to put in the effort
> necessary to fix this problem properly.
>
> I told you explicitly that if this memory allocation failure occurs, the
> bringup of the device has to fail.
>
> Your patch is making the situation worse, it breaks when there is an
> allocation failure, leaving the TX run partially allocated so that the
> driver will crash with an OOPS later.
>
> From your first iteration, you aren't build testing this change, and I
> therefore severely doubt you are functionally testing this change either.
>
> I hate to be harsh, but this is an extremely _poor_ patch submission.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists