From: Vipin Mehta <vmehta@atheros.com>
To: "Luis R. Rodriguez" <mcgrof@gmail.com>
Cc: Vipin Mehta <Vipin.Mehta@Atheros.com>,
"greg@kroah.com" <greg@kroah.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>
Subject: Re: [PATCH] staging: ath6kl: Fixing device NULL pointer dereference
Date: Wed, 15 Dec 2010 17:15:16 -0800 [thread overview]
Message-ID: <20101216011416.GA388@vmehta-desktop> (raw)
In-Reply-To: <AANLkTin_fw6aRc5Rs1_BTcapTE9kgPHy7_Gex9wRtkWy@mail.gmail.com>
On Tue, Dec 14, 2010 at 08:15:24PM -0800, Luis R. Rodriguez wrote:
> On Tue, Dec 14, 2010 at 5:17 PM, Vipin Mehta <vmehta@atheros.com> wrote:
> > Fixing the device instance being passed to set_wiphy_dev() from
> > NULL to the one being returned by the MMC stack probe callback.
> >
> > Signed-off-by: Vipin Mehta <vmehta@atheros.com>
> > ---
> > drivers/staging/ath6kl/os/linux/ar6000_drv.c | 19 ++++++++++++-------
> > 1 files changed, 12 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
> > index a659f70..9f3e928 100644
> > --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c
> > +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
> > @@ -1608,6 +1608,15 @@ ar6000_avail_ev(void *context, void *hif_handle)
> > struct wireless_dev *wdev;
> > #endif /* ATH6K_CONFIG_CFG80211 */
> > A_STATUS init_status = A_OK;
> > + HIF_DEVICE_OS_DEVICE_INFO osDevInfo;
> > +
> > + A_MEMZERO(&osDevInfo, sizeof(osDevInfo));
> > + if ( A_FAILED( HIFConfigureDevice(hif_handle, HIF_DEVICE_GET_OS_DEVICE,
> > + &osDevInfo, sizeof(osDevInfo))) )
>
> while you are adding new code, why not use the direct Linux calls?
I'll change the use of A_MEMZERO(), A_FAILED() macros and A_STATUS
data type given that we have an incoming patch that cleans the rest
of the code for similar usage. Changing the use of HIFConfigureDevice()
will be more useful if we do it across the driver since it will require
significant changes in the data structures defined in the HIF layer.
It qualifies for an entirely separate patch and can be done later in a
systematic way.
next prev parent reply other threads:[~2010-12-16 1:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-15 1:17 [PATCH] staging: ath6kl: Fixing device NULL pointer dereference Vipin Mehta
2010-12-15 4:15 ` Luis R. Rodriguez
2010-12-16 1:15 ` Vipin Mehta [this message]
2010-12-16 6:04 ` Joe Perches
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=20101216011416.GA388@vmehta-desktop \
--to=vmehta@atheros.com \
--cc=Vipin.Mehta@Atheros.com \
--cc=devel@driverdev.osuosl.org \
--cc=greg@kroah.com \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@gmail.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).