* [bug report] staging: vchiq_arm: pass vchiq instance to 'handle_to_service'
@ 2022-06-13 13:40 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2022-06-13 13:40 UTC (permalink / raw)
To: athierry
Cc: Broadcom internal kernel review list, linux-rpi-kernel,
linux-staging
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-13 13:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-13 13:40 [bug report] staging: vchiq_arm: pass vchiq instance to 'handle_to_service' Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox