All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kvalo@codeaurora.org
Cc: ath11k@lists.infradead.org
Subject: [bug report] ath11k: driver for Qualcomm IEEE 802.11ax devices
Date: Fri, 13 Dec 2019 13:51:49 +0300	[thread overview]
Message-ID: <20191213105149.r7knavfbd2xs76vv@kili.mountain> (raw)

Hello Kalle Valo,

This is a semi-automatic email about new static checker warnings.

The patch d5c65159f289: "ath11k: driver for Qualcomm IEEE 802.11ax 
devices" from Nov 23, 2019, leads to the following Smatch complaint:

    drivers/net/wireless/ath/ath11k/debug.c:575 ath11k_write_simulate_fw_crash()
     error: we previously assumed 'ar' could be null (see line 549)

drivers/net/wireless/ath/ath11k/debug.c
   548			ar = pdev->ar;
   549			if (ar && ar->state == ATH11K_STATE_ON) {
                            ^^
Check for NULL

   550				radioup = 1;
   551				break;
   552			}
   553		}
   554		/* filter partial writes and invalid commands */
   555		if (*ppos != 0 || count >= sizeof(buf) || count == 0)
   556			return -EINVAL;
   557	
   558		rc = simple_write_to_buffer(buf, sizeof(buf) - 1, ppos, user_buf, count);
   559		if (rc < 0)
   560			return rc;
   561	
   562		/* drop the possible '\n' from the end */
   563		if (buf[*ppos - 1] == '\n')
   564			buf[*ppos - 1] = '\0';
   565	
   566		if (radioup == 0) {
   567			ret = -ENETDOWN;
   568			goto exit;
   569		}
   570	
   571		if (!strcmp(buf, "assert")) {
   572			ath11k_info(ab, "simulating firmware assert crash\n");
   573			ret = ath11k_wmi_force_fw_hang_cmd(ar,
                                                           ^^
Unchecked dereference inside function

   574							   ATH11K_WMI_FW_HANG_ASSERT_TYPE,
   575							   ATH11K_WMI_FW_HANG_DELAY);
   576		} else {
   577			ret = -EINVAL;

regards,
dan carpenter

_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

             reply	other threads:[~2019-12-13 10:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-13 10:51 Dan Carpenter [this message]
2019-12-13 10:53 [bug report] ath11k: driver for Qualcomm IEEE 802.11ax devices Dan Carpenter
2019-12-13 12:39 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=20191213105149.r7knavfbd2xs76vv@kili.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=ath11k@lists.infradead.org \
    --cc=kvalo@codeaurora.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.