From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: Luis Rodriguez <Luis.Rodriguez@Atheros.com>
Cc: "linville@tuxdriver.com" <linville@tuxdriver.com>,
Sujith Manoharan <Sujith.Manoharan@Atheros.com>,
Senthilkumar Balasubramanian
<Senthilkumar.Balasubramanian@Atheros.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"ath9k-devel@lists.ath9k.org" <ath9k-devel@lists.ath9k.org>
Subject: Re: [PATCH 1/2] ath9k: Check for pci_map_single() errors
Date: Tue, 2 Dec 2008 18:23:38 -0800 [thread overview]
Message-ID: <20081203022338.GK9351@tesla> (raw)
In-Reply-To: <1228270866-21516-2-git-send-email-lrodriguez@atheros.com>
On Tue, Dec 02, 2008 at 06:21:05PM -0800, Luis Rodriguez wrote:
> pci_map_single() can fail so detect those errors with
> pci_dma_mapping_error() and deal with them accordingly.
>
> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
> ---
> drivers/net/wireless/ath9k/beacon.c | 16 +++++++++++++++-
> drivers/net/wireless/ath9k/recv.c | 15 +++++++++++++++
> drivers/net/wireless/ath9k/xmit.c | 23 +++++++++++++++++++++--
> 3 files changed, 51 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ath9k/beacon.c b/drivers/net/wireless/ath9k/beacon.c
> index e80d9b9..a393761 100644
> --- a/drivers/net/wireless/ath9k/beacon.c
> +++ b/drivers/net/wireless/ath9k/beacon.c
> @@ -192,6 +192,13 @@ static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id)
> pci_map_single(sc->pdev, skb->data,
> skb->len,
> PCI_DMA_TODEVICE);
> + if (unlikely(pci_dma_mapping_error(sc->pdev, bf->bf_buf_addr))) {
> + dev_kfree_skb(skb);
Bleh, these are all wrong, they should be dev_kfree_skb_any(skb).
Luis
prev parent reply other threads:[~2008-12-03 2:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-03 2:21 [PATCH 0/2] ath9k: few memory fixes Luis R. Rodriguez
2008-12-03 2:21 ` [PATCH 1/2] ath9k: Check for pci_map_single() errors Luis R. Rodriguez
2008-12-03 2:21 ` [PATCH 2/2] ath9k: Use GFP_ATOMIC when allocating TX private area Luis R. Rodriguez
2008-12-03 2:23 ` Luis R. Rodriguez [this message]
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=20081203022338.GK9351@tesla \
--to=lrodriguez@atheros.com \
--cc=Luis.Rodriguez@Atheros.com \
--cc=Senthilkumar.Balasubramanian@Atheros.com \
--cc=Sujith.Manoharan@Atheros.com \
--cc=ath9k-devel@lists.ath9k.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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;
as well as URLs for NNTP newsgroup(s).