From: Thomas Chou <thomas@wytron.com.tw>
To: Dan Carpenter <error27@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: null dereference in ethoc_probe()
Date: Mon, 24 May 2010 08:29:30 +0800 [thread overview]
Message-ID: <4BF9C86A.4080400@wytron.com.tw> (raw)
In-Reply-To: <20100522155455.GE22515@bicker>
Dan Carpenter wrote:
> 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.
>
> 1062 dma_free_coherent(NULL, priv->dma_alloc, priv->membase,
> 1063 netdev->mem_start);
> 1064 free_netdev(netdev);
>
> Also I think the error handling is not as complete as it should be. It
> seems like we should call devm_iounmap() and release some of the other
> resources as well.
>
> regards,
> dan carpenter
>
>
>
Hi Dan,
Thank you for reporting this bug. I will submit patch to fix this mistake.
Best regards,
Thomas
next prev parent reply other threads:[~2010-05-24 0:41 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 [this message]
2010-05-24 2:44 ` [PATCH] ethoc: fix null dereference in ethoc_probe Thomas Chou
2010-05-24 6:11 ` David Miller
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=4BF9C86A.4080400@wytron.com.tw \
--to=thomas@wytron.com.tw \
--cc=error27@gmail.com \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.