In the Linux kernel, the following vulnerability has been resolved: pinmux: Use sequential access to access desc->pinmux data When two client of the same gpio call pinctrlselectstate() for the same functionality, we are seeing NULL pointer issue while accessing desc->muxowner. Let's say two processes A, B executing in pinrequest() for the same pin and process A updates the desc->muxusecount but not yet updated the desc->muxowner while process B see the desc->muxusecount which got updated by A path and further executes strcmp and while accessing desc->muxowner it crashes with NULL pointer. Serialize the access to mux related setting with a mutex lock. cpu0 (process A) cpu1(process B) pinctrlselectstate() { pinctrlselectstate() { pinrequest() { pinrequest() { ... .... } else { desc->muxusecount++; desc->muxusecount && strcmp(desc->muxowner, owner)) { if (desc->muxusecount > 1) return 0; desc->mux_owner = owner; } }