linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: emmanuel.grumbach@intel.com
Cc: linux-wireless@vger.kernel.org
Subject: [bug report] iwlwifi: mei: add the driver to allow cooperation with CSME
Date: Thu, 16 Dec 2021 13:17:06 +0300	[thread overview]
Message-ID: <20211216101706.GA20233@kili> (raw)

Hello Emmanuel Grumbach,

The patch 2da4366f9e2c: "iwlwifi: mei: add the driver to allow
cooperation with CSME" from Nov 12, 2021, leads to the following
Smatch static checker warning:

	drivers/net/wireless/intel/iwlwifi/mei/net.c:199 iwl_mei_rx_filter_ipv4()
	warn: taking sizeof binop

drivers/net/wireless/intel/iwlwifi/mei/net.c
    188 static bool iwl_mei_rx_filter_ipv4(struct sk_buff *skb,
    189                                    const struct iwl_sap_oob_filters *filters,
    190                                    rx_handler_result_t *rx_handler_res)
    191 {
    192         const struct iwl_sap_ipv4_filter *filt = &filters->ipv4_filter;
    193         const struct iphdr *iphdr;
    194         unsigned int iphdrlen;
    195         bool match;
    196 
    197         if (!pskb_may_pull(skb, skb_network_offset(skb) + sizeof(*iphdr)) ||
    198             !pskb_may_pull(skb, skb_network_offset(skb) +
--> 199                            sizeof(ip_hdrlen(skb) - sizeof(*iphdr))))

Probably this should be: ip_hdrlen(skb) - sizeof(*iphdr)?

    200                 return false;
    201 
    202         iphdrlen = ip_hdrlen(skb);

regards,
dan carpenter

             reply	other threads:[~2021-12-16 10:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-16 10:17 Dan Carpenter [this message]
2021-12-16 10:22 ` [bug report] iwlwifi: mei: add the driver to allow cooperation with CSME Grumbach, Emmanuel
  -- strict thread matches above, loose matches on Subject: below --
2021-11-30 10:37 Dan Carpenter

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=20211216101706.GA20233@kili \
    --to=dan.carpenter@oracle.com \
    --cc=emmanuel.grumbach@intel.com \
    --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;
as well as URLs for NNTP newsgroup(s).