* [PATCH RESEND] mwifiex: fix NULL pointer dereference error @ 2016-03-30 10:14 Wei-Ning Huang 2016-03-30 10:26 ` Sedat Dilek 2016-04-07 16:40 ` [RESEND] " Kalle Valo 0 siblings, 2 replies; 7+ messages in thread From: Wei-Ning Huang @ 2016-03-30 10:14 UTC (permalink / raw) To: Linux Wireless; +Cc: LKML, djkurtz, snanda, akarwar, Wei-Ning Huang In mwifiex_enable_hs, we need to check if priv->wdev.wiphy->wowlan_config is NULL before accessing it's member. This sometimes cause kernel panic when suspend/resume. Signed-off-by: Wei-Ning Huang <wnhuang@chromium.org> --- drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c index d5c56eb..d8de432 100644 --- a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c @@ -509,7 +509,8 @@ int mwifiex_enable_hs(struct mwifiex_adapter *adapter) if (priv && priv->sched_scanning) { #ifdef CONFIG_PM - if (!priv->wdev.wiphy->wowlan_config->nd_config) { + if (priv->wdev.wiphy->wowlan_config && + !priv->wdev.wiphy->wowlan_config->nd_config) { #endif mwifiex_dbg(adapter, CMD, "aborting bgscan!\n"); mwifiex_stop_bg_scan(priv); -- 2.1.2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH RESEND] mwifiex: fix NULL pointer dereference error 2016-03-30 10:14 [PATCH RESEND] mwifiex: fix NULL pointer dereference error Wei-Ning Huang @ 2016-03-30 10:26 ` Sedat Dilek 2016-03-30 10:38 ` Wei-Ning Huang 2016-04-07 16:40 ` [RESEND] " Kalle Valo 1 sibling, 1 reply; 7+ messages in thread From: Sedat Dilek @ 2016-03-30 10:26 UTC (permalink / raw) To: Wei-Ning Huang; +Cc: Linux Wireless, LKML, djkurtz, snanda, akarwar On Wed, Mar 30, 2016 at 12:14 PM, Wei-Ning Huang <wnhuang@chromium.org> wrote: > In mwifiex_enable_hs, we need to check if > priv->wdev.wiphy->wowlan_config is NULL before accessing it's member. it's... its member (not it's) :-). - Sedat - > This sometimes cause kernel panic when suspend/resume. > > Signed-off-by: Wei-Ning Huang <wnhuang@chromium.org> > --- > drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c > index d5c56eb..d8de432 100644 > --- a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c > +++ b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c > @@ -509,7 +509,8 @@ int mwifiex_enable_hs(struct mwifiex_adapter *adapter) > > if (priv && priv->sched_scanning) { > #ifdef CONFIG_PM > - if (!priv->wdev.wiphy->wowlan_config->nd_config) { > + if (priv->wdev.wiphy->wowlan_config && > + !priv->wdev.wiphy->wowlan_config->nd_config) { > #endif > mwifiex_dbg(adapter, CMD, "aborting bgscan!\n"); > mwifiex_stop_bg_scan(priv); > -- > 2.1.2 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-wireless" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RESEND] mwifiex: fix NULL pointer dereference error 2016-03-30 10:26 ` Sedat Dilek @ 2016-03-30 10:38 ` Wei-Ning Huang 2016-03-30 10:40 ` Sedat Dilek 2016-03-30 12:00 ` Kalle Valo 0 siblings, 2 replies; 7+ messages in thread From: Wei-Ning Huang @ 2016-03-30 10:38 UTC (permalink / raw) To: sedat.dilek Cc: Linux Wireless, LKML, Daniel Kurtz, snanda, Amitkumar Karwar, Kalle Valo ah.. thanks. Kalle, can you help amend the message if this patch is accepted? Thanks a lot. Wei-Ning On Wed, Mar 30, 2016 at 6:26 PM, Sedat Dilek <sedat.dilek@gmail.com> wrote: > On Wed, Mar 30, 2016 at 12:14 PM, Wei-Ning Huang <wnhuang@chromium.org> wrote: >> In mwifiex_enable_hs, we need to check if >> priv->wdev.wiphy->wowlan_config is NULL before accessing it's member. > > it's... its member (not it's) :-). > > - Sedat - > >> This sometimes cause kernel panic when suspend/resume. >> >> Signed-off-by: Wei-Ning Huang <wnhuang@chromium.org> >> --- >> drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c >> index d5c56eb..d8de432 100644 >> --- a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c >> +++ b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c >> @@ -509,7 +509,8 @@ int mwifiex_enable_hs(struct mwifiex_adapter *adapter) >> >> if (priv && priv->sched_scanning) { >> #ifdef CONFIG_PM >> - if (!priv->wdev.wiphy->wowlan_config->nd_config) { >> + if (priv->wdev.wiphy->wowlan_config && >> + !priv->wdev.wiphy->wowlan_config->nd_config) { >> #endif >> mwifiex_dbg(adapter, CMD, "aborting bgscan!\n"); >> mwifiex_stop_bg_scan(priv); >> -- >> 2.1.2 >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html -- Wei-Ning Huang, 黃偉寧 | Software Engineer, Google Inc., Taiwan | wnhuang@google.com | Cell: +886 910-380678 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RESEND] mwifiex: fix NULL pointer dereference error 2016-03-30 10:38 ` Wei-Ning Huang @ 2016-03-30 10:40 ` Sedat Dilek 2016-03-30 12:00 ` Kalle Valo 1 sibling, 0 replies; 7+ messages in thread From: Sedat Dilek @ 2016-03-30 10:40 UTC (permalink / raw) To: Wei-Ning Huang Cc: Linux Wireless, LKML, Daniel Kurtz, snanda, Amitkumar Karwar, Kalle Valo On Wed, Mar 30, 2016 at 12:38 PM, Wei-Ning Huang <wnhuang@google.com> wrote: > ah.. thanks. > > Kalle, can you help amend the message if this patch is accepted? > Thanks a lot. > http://its-not-its.info/ - Sedat - > Wei-Ning > > On Wed, Mar 30, 2016 at 6:26 PM, Sedat Dilek <sedat.dilek@gmail.com> wrote: >> On Wed, Mar 30, 2016 at 12:14 PM, Wei-Ning Huang <wnhuang@chromium.org> wrote: >>> In mwifiex_enable_hs, we need to check if >>> priv->wdev.wiphy->wowlan_config is NULL before accessing it's member. >> >> it's... its member (not it's) :-). >> >> - Sedat - >> >>> This sometimes cause kernel panic when suspend/resume. >>> >>> Signed-off-by: Wei-Ning Huang <wnhuang@chromium.org> >>> --- >>> drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 3 ++- >>> 1 file changed, 2 insertions(+), 1 deletion(-) >>> >>> diff --git a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c >>> index d5c56eb..d8de432 100644 >>> --- a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c >>> +++ b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c >>> @@ -509,7 +509,8 @@ int mwifiex_enable_hs(struct mwifiex_adapter *adapter) >>> >>> if (priv && priv->sched_scanning) { >>> #ifdef CONFIG_PM >>> - if (!priv->wdev.wiphy->wowlan_config->nd_config) { >>> + if (priv->wdev.wiphy->wowlan_config && >>> + !priv->wdev.wiphy->wowlan_config->nd_config) { >>> #endif >>> mwifiex_dbg(adapter, CMD, "aborting bgscan!\n"); >>> mwifiex_stop_bg_scan(priv); >>> -- >>> 2.1.2 >>> >>> -- >>> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in >>> the body of a message to majordomo@vger.kernel.org >>> More majordomo info at http://vger.kernel.org/majordomo-info.html > > > > -- > Wei-Ning Huang, 黃偉寧 | Software Engineer, Google Inc., Taiwan | > wnhuang@google.com | Cell: +886 910-380678 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RESEND] mwifiex: fix NULL pointer dereference error 2016-03-30 10:38 ` Wei-Ning Huang 2016-03-30 10:40 ` Sedat Dilek @ 2016-03-30 12:00 ` Kalle Valo 2016-03-30 12:11 ` Wei-Ning Huang 1 sibling, 1 reply; 7+ messages in thread From: Kalle Valo @ 2016-03-30 12:00 UTC (permalink / raw) To: Wei-Ning Huang Cc: sedat.dilek, Linux Wireless, LKML, Daniel Kurtz, snanda, Amitkumar Karwar Wei-Ning Huang <wnhuang@google.com> writes: > Kalle, can you help amend the message if this patch is accepted? Sure, I'll fix the typo in the commit log. But please try to avoid top posting, it makes it more difficult to follow the threads. -- Kalle Valo ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RESEND] mwifiex: fix NULL pointer dereference error 2016-03-30 12:00 ` Kalle Valo @ 2016-03-30 12:11 ` Wei-Ning Huang 0 siblings, 0 replies; 7+ messages in thread From: Wei-Ning Huang @ 2016-03-30 12:11 UTC (permalink / raw) To: Kalle Valo Cc: sedat.dilek, Linux Wireless, LKML, Daniel Kurtz, Sameer Nanda, Amitkumar Karwar On Wed, Mar 30, 2016 at 8:00 PM, Kalle Valo <kvalo@codeaurora.org> wrote: > Wei-Ning Huang <wnhuang@google.com> writes: > >> Kalle, can you help amend the message if this patch is accepted? > > Sure, I'll fix the typo in the commit log. > > But please try to avoid top posting, it makes it more difficult to > follow the threads. > > -- > Kalle Valo Noted, thanks for the reminder :) Wei-Ning -- Wei-Ning Huang, 黃偉寧 | Software Engineer, Google Inc., Taiwan | wnhuang@google.com | Cell: +886 910-380678 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RESEND] mwifiex: fix NULL pointer dereference error 2016-03-30 10:14 [PATCH RESEND] mwifiex: fix NULL pointer dereference error Wei-Ning Huang 2016-03-30 10:26 ` Sedat Dilek @ 2016-04-07 16:40 ` Kalle Valo 1 sibling, 0 replies; 7+ messages in thread From: Kalle Valo @ 2016-04-07 16:40 UTC (permalink / raw) To: Wei-Ning Huang Cc: Linux Wireless, LKML, djkurtz, snanda, akarwar, Wei-Ning Huang > In mwifiex_enable_hs, we need to check if > priv->wdev.wiphy->wowlan_config is NULL before accessing its member. > This sometimes cause kernel panic when suspend/resume. > > Signed-off-by: Wei-Ning Huang <wnhuang@chromium.org> Thanks, applied to wireless-drivers-next.git. Kalle Valo ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-04-07 16:40 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-03-30 10:14 [PATCH RESEND] mwifiex: fix NULL pointer dereference error Wei-Ning Huang 2016-03-30 10:26 ` Sedat Dilek 2016-03-30 10:38 ` Wei-Ning Huang 2016-03-30 10:40 ` Sedat Dilek 2016-03-30 12:00 ` Kalle Valo 2016-03-30 12:11 ` Wei-Ning Huang 2016-04-07 16:40 ` [RESEND] " Kalle Valo
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).