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: Tue, 30 Nov 2021 13:37:46 +0300 [thread overview]
Message-ID: <20211130103746.GA5779@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/main.c:632 iwl_mei_handle_csme_filters()
error: potential null dereference 'new_filters'. (kzalloc returns null)
drivers/net/wireless/intel/iwlwifi/mei/main.c
618 static void iwl_mei_handle_csme_filters(struct mei_cl_device *cldev,
619 const struct iwl_sap_csme_filters *filters)
620 {
621 struct iwl_mei *mei = mei_cldev_get_drvdata(iwl_mei_global_cldev);
622 struct iwl_mei_filters *new_filters;
623 struct iwl_mei_filters *old_filters;
624
625 old_filters =
626 rcu_dereference_protected(mei->filters,
627 lockdep_is_held(&iwl_mei_mutex));
628
629 new_filters = kzalloc(sizeof(*new_filters), GFP_KERNEL);
^^^^^^^^^^^^^^^^^^^^^
No check for NULL on this allocation.
630
631 /* Copy the OOB filters */
--> 632 new_filters->filters = filters->filters;
633
634 rcu_assign_pointer(mei->filters, new_filters);
635
636 if (old_filters)
637 kfree_rcu(old_filters, rcu_head);
638 }
regards,
dan carpenter
next reply other threads:[~2021-11-30 10:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-30 10:37 Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-12-16 10:17 [bug report] iwlwifi: mei: add the driver to allow cooperation with CSME Dan Carpenter
2021-12-16 10:22 ` Grumbach, Emmanuel
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=20211130103746.GA5779@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.