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: Thu, 10 Sep 2009 20:39:51 -0700 [thread overview]
Message-ID: <20090910203951.041d5c17.akpm@linux-foundation.org> (raw)
In-Reply-To: <1252587402-7382-2-git-send-email-albert_herranz@yahoo.es>
On Thu, 10 Sep 2009 14:56:42 +0200 Albert Herranz <albert_herranz@yahoo.es> wrote:
> 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.
: if (i < ARRAY_SIZE(cis_tpl_list)) {
: 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
: } else if (tpl->parse) {
: ret = tpl->parse(card, func,
: this->data, tpl_link);
: }
: /* already successfully parsed, not needed anymore */
: if (!ret)
: kfree(this);
`this' doesn't get freed
: } else {
: /* unknown tuple */
: ret = -EILSEQ;
: }
:
: if (ret == -EILSEQ) {
`this' doesn't get remembered.
: /* this tuple is unknown to the core */
: this->next = NULL;
: this->code = tpl_code;
: this->size = tpl_link;
: *prev = this;
: prev = &this->next;
: pr_debug("%s: queuing CIS tuple 0x%02x length %u\n",
: mmc_hostname(card->host), tpl_code, tpl_link);
: /* keep on analyzing tuples */
: ret = 0;
: }
:
: ptr += tpl_link;
`this' leaks.
: } while (!ret);
Please check?
next prev parent reply other threads:[~2009-09-11 3:39 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
[not found] ` <1252587402-7382-1-git-send-email-albert_herranz-mRCrAkd8dF0@public.gmane.org>
2009-09-10 12:56 ` [PATCH] sdio: pass unknown cis tuples to sdio drivers Albert Herranz
2009-09-11 3:39 ` Andrew Morton [this message]
[not found] ` <20090910203951.041d5c17.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2009-09-11 7:52 ` Albert Herranz
[not found] ` <354996.83066.qm-T3+ej8jpW3nGRxTy+Q50vsz6deESKz/lQQ4Iyu8u01E@public.gmane.org>
2009-09-11 8:01 ` Andrew Morton
2009-09-11 8:28 ` Albert Herranz
[not found] ` <1252587402-7382-2-git-send-email-albert_herranz-mRCrAkd8dF0@public.gmane.org>
2009-09-11 6:06 ` Pierre Ossman
[not found] ` <20090911080659.2ac822fc-OhHrUh4vRMS8I+09wXhka4dd74u8MsAO@public.gmane.org>
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=20090910203951.041d5c17.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