netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: thomas@wytron.com.tw
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	thierry.reding@avionic-design.de, nios2-dev@sopc.et.ntust.edu.tw,
	error27@gmail.com
Subject: Re: [PATCH] ethoc: fix null dereference in ethoc_probe
Date: Sun, 23 May 2010 23:11:24 -0700 (PDT)	[thread overview]
Message-ID: <20100523.231124.236272338.davem@davemloft.net> (raw)
In-Reply-To: <1274669042-1901-1-git-send-email-thomas@wytron.com.tw>

From: Thomas Chou <thomas@wytron.com.tw>
Date: Mon, 24 May 2010 10:44:02 +0800

> Dan reported the patch 0baa080c75c: "ethoc: use system memory
> as buffer" introduced a potential null dereference.
> 
>   1060  free:
>   1061          if (priv->dma_alloc)
>                     ^^^^^^^^^^^^^^^
> 	priv can be null here.
> 
> He also suggested that the error handling is not complete.
> 
> This patch fixes the null priv issue and improves resources
> releasing in ethoc_probe() and ethoc_remove().
> 
> Reported-by: Dan Carpenter <error27@gmail.com>
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>

Applied.

  reply	other threads:[~2010-05-24  6:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-22 15:55 null dereference in ethoc_probe() Dan Carpenter
2010-05-24  0:29 ` Thomas Chou
2010-05-24  2:44 ` [PATCH] ethoc: fix null dereference in ethoc_probe Thomas Chou
2010-05-24  6:11   ` David Miller [this message]
2010-05-25  6:16   ` [Nios2-dev] " Tobias Klauser
2010-05-25  6:51     ` Thomas Chou

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=20100523.231124.236272338.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=error27@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nios2-dev@sopc.et.ntust.edu.tw \
    --cc=thierry.reding@avionic-design.de \
    --cc=thomas@wytron.com.tw \
    /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;
as well as URLs for NNTP newsgroup(s).