From: "Grumbach, Emmanuel" <emmanuel.grumbach@intel.com>
To: "xerofoify@gmail.com" <xerofoify@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Spinadel, David" <david.spinadel@intel.com>,
"ilw@linux.intel.com" <ilw@linux.intel.com>,
"Coelho, Luciano" <luciano.coelho@intel.com>,
"eliad@wizery.com" <eliad@wizery.com>,
"Berg, Johannes" <johannes.berg@intel.com>,
"kvalo@codeaurora.org" <kvalo@codeaurora.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] iwlwifi:dvm:Return false if resume command data is not same size as received packet for the function iwl_resume_status_fn
Date: Wed, 10 Jun 2015 17:10:09 +0000 [thread overview]
Message-ID: <1433956209.20602.5.camel@intel.com> (raw)
In-Reply-To: <D665C857-C846-422A-A3D9-A9314B000CD6@gmail.com>
On Wed, 2015-06-10 at 12:58 -0400, Nicholas Krause wrote:
>
> On June 10, 2015 12:50:45 PM EDT, "Grumbach, Emmanuel" <emmanuel.grumbach@intel.com> wrote:
> >On Wed, 2015-06-10 at 12:33 -0400, Nicholas Krause wrote:
> >> This makes the function iwl_resume_status_fn return false now if
> >> the received packet of type iwl_rx_packet is not the same size
> >> as the structure pointer, iwl_resume_data's cmd element in order
> >> to signal callers about this error and allow them to handle it
> >> occurrently.
> >>
> >
> >Hm... Did you actually hit this if?
> >I am not sure I really want to wait here (which is what will happen if
> >you return false) when we get an unexpected length? I do not expect
> >anything besides the response I am waiting for since the firmware is
> >handling the GET_STATUS *only* - it just came back from WoWLAN. Bottom
> >line, this is really an error path and I prefer to exit and not wait
> >for
> >the timeout in that case.
> >But I might be missing something?
> >
> Why not wait for the time out? Seems there is no reason not to and in that case
> if the firmware handles this
I doubt it will. This goes back to my original question: did you really
hit this path? Does the patch solves a real bug you faced?
> why is the if statement still here.
To get a debug print? :)
> Nick
> >> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
> >> ---
> >> drivers/net/wireless/iwlwifi/dvm/mac80211.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c
> >b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
> >> index 5abd62e..21e808c 100644
> >> --- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c
> >> +++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
> >> @@ -409,7 +409,7 @@ static bool iwl_resume_status_fn(struct
> >iwl_notif_wait_data *notif_wait,
> >>
> >> if (iwl_rx_packet_payload_len(pkt) != sizeof(*resume_data->cmd)) {
> >> IWL_ERR(priv, "rx wrong size data\n");
> >> - return true;
> >> + return false;
> >> }
> >> memcpy(resume_data->cmd, pkt->data, sizeof(*resume_data->cmd));
> >> resume_data->valid = true;
>
prev parent reply other threads:[~2015-06-10 17:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1433954031-7176-1-git-send-email-xerofoify@gmail.com>
[not found] ` <1433954031-7176-1-git-send-email-xerofoify-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-06-10 16:50 ` [PATCH] iwlwifi:dvm:Return false if resume command data is not same size as received packet for the function iwl_resume_status_fn Grumbach, Emmanuel
[not found] ` <D665C857-C846-422A-A3D9-A9314B000CD6@gmail.com>
2015-06-10 17:10 ` Grumbach, Emmanuel [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=1433956209.20602.5.camel@intel.com \
--to=emmanuel.grumbach@intel.com \
--cc=david.spinadel@intel.com \
--cc=eliad@wizery.com \
--cc=ilw@linux.intel.com \
--cc=johannes.berg@intel.com \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=luciano.coelho@intel.com \
--cc=netdev@vger.kernel.org \
--cc=xerofoify@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).