<div dir="ltr"><div><div>Hi Krzysztof Karas,</div><br><div>
<div>Ignored (unchecked) return values from functions that can fail. <br>While a single unchecked return may look harmless, in aggregate they create a broad <br>attack surface — a latent, easily-exploitable category of vulnerabilities that can lead to data corruption, <br>denial-of-service, or privilege escalation when error conditions are hit in the field.<br><br></div>

Counter example: 
/drivers/gpu/drm/drm_prime.c:748:<br>
<div style="color:rgb(212,212,212);background-color:rgb(47,52,60);font-family:Consolas,"Courier New",monospace;font-weight:normal;font-size:12px;line-height:16px;white-space:pre"><div><span style="color:rgb(212,212,212)">ret </span><span style="color:rgb(220,220,220)">=</span><span style="color:rgb(212,212,212)"> drm_vma_node_allow</span><span style="color:rgb(220,220,220)">(&</span><span style="color:rgb(212,212,212)">obj->vma_node</span><span style="color:rgb(220,220,220)">,</span><span style="color:rgb(212,212,212)"> priv</span><span style="color:rgb(220,220,220)">);</span></div><div><span style="color:rgb(212,212,212)">    </span><span style="color:rgb(86,156,214)">if</span><span style="color:rgb(212,212,212)"> </span><span style="color:rgb(220,220,220)">(</span><span style="color:rgb(212,212,212)">ret</span><span style="color:rgb(220,220,220)">)</span></div><div><span style="color:rgb(212,212,212)">        </span><span style="color:rgb(86,156,214)">goto</span><span style="color:rgb(212,212,212)"> out</span><span style="color:rgb(220,220,220)">;</span></div></div><br>Counter example:  /drivers/gpu/drm/drm_gem.c:387:<br>
<div style="color:rgb(212,212,212);background-color:rgb(47,52,60);font-family:Consolas,"Courier New",monospace;font-weight:normal;font-size:12px;line-height:16px;white-space:pre"><div><span style="color:rgb(212,212,212)">ret </span><span style="color:rgb(220,220,220)">=</span><span style="color:rgb(212,212,212)"> drm_vma_node_allow</span><span style="color:rgb(220,220,220)">(&</span><span style="color:rgb(212,212,212)">obj->vma_node</span><span style="color:rgb(220,220,220)">,</span><span style="color:rgb(212,212,212)"> file_priv</span><span style="color:rgb(220,220,220)">);</span></div><div><span style="color:rgb(212,212,212)">    </span><span style="color:rgb(86,156,214)">if</span><span style="color:rgb(212,212,212)"> </span><span style="color:rgb(220,220,220)">(</span><span style="color:rgb(212,212,212)">ret</span><span style="color:rgb(220,220,220)">)</span></div><div><span style="color:rgb(212,212,212)">        </span><span style="color:rgb(86,156,214)">goto</span><span style="color:rgb(212,212,212)"> err_remove</span><span style="color:rgb(220,220,220)">;</span></div></div><br></div>Best Regards,<br></div>Alexandr</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">вт, 23 сент. 2025 г. в 12:07, Krzysztof Karas <<a href="mailto:krzysztof.karas@intel.com">krzysztof.karas@intel.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Alexandr,<br>
<br>
> Return value of function 'drm_vma_node_allow', called <br>
> at i915_gem_mman.c:670, is not checked, but it is usually <br>
> checked for this function<br>
Grepping for this function in the repo tells me this is currently<br>
the only place we call it. I'd rephrase the commit message to focus<br>
only on missing return code.<br>
<br>
After that:<br>
Reviewed-by: Krzysztof Karas <<a href="mailto:krzysztof.karas@intel.com" target="_blank">krzysztof.karas@intel.com</a>><br>
-- <br>
Best Regards,<br>
Krzysztof<br>
</blockquote></div>