From: Dan Carpenter <dan.carpenter@oracle.com>
To: athierry@redhat.com
Cc: Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
linux-rpi-kernel@lists.infradead.org,
linux-staging@lists.linux.dev
Subject: [bug report] staging: vchiq_arm: pass vchiq instance to 'handle_to_service'
Date: Mon, 13 Jun 2022 16:40:09 +0300 [thread overview]
Message-ID: <Yqc+Oavmh0zMRVPQ@kili> (raw)
Hello Adrien Thierry,
This is a semi-automatic email about new static checker warnings.
The patch 6d02150cdf76: "staging: vchiq_arm: pass vchiq instance to
'handle_to_service'" from May 18, 2022, leads to the following Smatch
complaint:
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1070 service_callback()
warn: variable dereferenced before check 'instance' (see line 1062)
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
1061 rcu_read_lock();
1062 service = handle_to_service(instance, handle);
^^^^^^^^
New dereference
1063 if (WARN_ON(!service)) {
1064 rcu_read_unlock();
1065 return VCHIQ_SUCCESS;
1066 }
1067
1068 user_service = (struct user_service *)service->base.userdata;
1069
1070 if (!instance || instance->closing) {
^^^^^^^^
Existing code checked for NULL
1071 rcu_read_unlock();
1072 return VCHIQ_SUCCESS;
regards,
dan carpenter
reply other threads:[~2022-06-13 13:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=Yqc+Oavmh0zMRVPQ@kili \
--to=dan.carpenter@oracle.com \
--cc=athierry@redhat.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux-staging@lists.linux.dev \
/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