Linux wireless drivers development
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Albert Herranz <albert_herranz@yahoo.es>
Cc: linux-mmc@vger.kernel.org, bcm43xx-dev@lists.berlios.de,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH] sdio: pass unknown cis tuples to sdio drivers
Date: Fri, 11 Sep 2009 01:01:02 -0700	[thread overview]
Message-ID: <20090911010102.4c7840b0.akpm@linux-foundation.org> (raw)
In-Reply-To: <354996.83066.qm@web28302.mail.ukl.yahoo.com>

On Fri, 11 Sep 2009 07:52:11 +0000 (GMT) Albert Herranz <albert_herranz@yahoo.es> wrote:

> --- El vie, 11/9/09, Andrew Morton <akpm@linux-foundation.org> escribi__:
> > > Some manufacturers provide vendor information in
> > non-vendor specific CIS
> > > tuples. For example, Broadcom uses an Extended
> > Function tuple to provide
> > > the MAC address on some of their network cards, as in
> > the case of the
> > > Nintendo Wii WLAN daughter card.
> > > 
> > > This patch allows passing correct tuples unknown to
> > the SDIO core to
> > > a matching SDIO driver instead of rejecting them and
> > failing.
> > > 
> > 
> > This looks leaky to me.
> > 
> 
> Hi Andrew, thanks for the review.
> I hope I can clarify a bit what the patch does in the next comments.
> 
> > 
> > : ______ ______ if (i < ARRAY_SIZE(cis_tpl_list)) {

argh, now yahoo mail is converting tabs to 0xa0's as well.  Despair.

> > : ______ ______ ______ const struct cis_tpl *tpl = cis_tpl_list + i;
> > : ______ ______ ______ if (tpl_link < tpl->min_size) {
> > : ______ ______ ______ ______ printk(KERN_ERR
> > : ______ ______ ______ ______ __ __ ______"%s: bad CIS tuple 0x%02x"
> > : ______ ______ ______ ______ __ __ ______" (length = %u, expected >= %u)\n",
> > : ______ ______ ______         ______mmc_hostname(card->host),
> > : ______ ______ ______ ______ __ __ ______tpl_code, tpl_link, tpl->min_size);
> > : ______ ______ ______ ______ ret = -EINVAL;
> > 
> > ret == -EINVAL
> > 
> 
> At this point ret is not -EINVAL.

Yes it is.  We just did

	ret = -EINVAL;


If that assignment happens, we leak `this'.

  reply	other threads:[~2009-09-11  8:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-10 12:56 [PATCH] sdio: recognize io card without powercycle Albert Herranz
2009-09-10 12:56 ` [PATCH] sdio: pass unknown cis tuples to sdio drivers Albert Herranz
2009-09-11  3:39   ` Andrew Morton
2009-09-11  7:52     ` Albert Herranz
2009-09-11  8:01       ` Andrew Morton [this message]
2009-09-11  8:28         ` Albert Herranz
2009-09-11  6:06   ` Pierre Ossman
2009-09-11  8:21     ` Albert Herranz
2009-09-11  5:58 ` [PATCH] sdio: recognize io card without powercycle Pierre Ossman

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=20090911010102.4c7840b0.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=albert_herranz@yahoo.es \
    --cc=bcm43xx-dev@lists.berlios.de \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-wireless@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox