mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: xerofoify@gmail.com
Cc: andriy.shevchenko@linux.intel.com, dvhart@linux.intel.com,
	jeffrey.t.kirsher@intel.com, ast@plumgrid.com,
	dborkman@redhat.com, bhutchings@solarflare.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Missing return check against Null for return value of netdev_alloc_dev_skb()
Date: Sun, 15 Jun 2014 19:26:35 -0700 (PDT)	[thread overview]
Message-ID: <20140615.192635.533361731164638772.davem@davemloft.net> (raw)
In-Reply-To: <CAPDOMVgV8V8fPpZupwQaDERiK-0OMLt66LULR6Biw1=8LJhOKw@mail.gmail.com>

From: Nick Krause <xerofoify@gmail.com>
Date: Sun, 15 Jun 2014 16:27:23 -0400

> From 62b0d77a1430f74b7f5c008c5e8bec11604b33b0 Mon Sep 17 00:00:00 2001
> From: Nick <xerofoify@gmail.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@gmail.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.

  reply	other threads:[~2014-06-16  2:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-15  4:05 Nick
2014-06-15  4:39 ` Nick Krause
2014-06-15  6:53 ` David Miller
2014-06-15 20:27   ` Nick Krause
2014-06-16  2:26     ` David Miller [this message]
2014-06-16  3:28       ` Nick Krause
2014-06-16 13:32     ` Sergei Shtylyov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140615.192635.533361731164638772.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=ast@plumgrid.com \
    --cc=bhutchings@solarflare.com \
    --cc=dborkman@redhat.com \
    --cc=dvhart@linux.intel.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=xerofoify@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®