<div dir="ltr">Hi,<div><br></div><div>This is probably dead code: the (!prog || !prog->len) check was dropped in 93a73d442d37 ("bpf, x86/arm64: remove useless checks on prog")</div><div><br></div><div>"""</div><div><div> There is never such a situation, where bpf_int_jit_compile() is</div><div> called with either prog as NULL or len as 0, so the tests are</div><div> unnecessary and confusing as people would just copy them.</div></div><div>"""</div><div><br></div><div>So it probably doesn't matter, but for consistence and in case it's not actually dead on Xenial, we should probably do a fixup to return prog. I'm happy to do that if you want - do you want a standard launchpad bug for it?</div><div><br></div><div>Regards,</div><div>Daniel</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 24, 2018 at 5:13 AM, Colin Ian King <span dir="ltr"><<a href="mailto:colin.king@canonical.com" target="_blank">colin.king@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">CoverityScan picked this bpf issue in Xenial, anyone care to see if this<br>
needs fixing?<br>
<br>
Colin<br>
<br>
-------- Forwarded Message --------<br>
Subject: New Defects reported by Coverity Scan for ubuntu-xenial-kernel<br>
Date: Tue, 23 Jan 2018 18:10:19 +0000 (UTC)<br>
From: <a href="mailto:scan-admin@coverity.com">scan-admin@coverity.com</a><br>
To: <a href="mailto:colin.king@canonical.com">colin.king@canonical.com</a><br>
<br>
<br>
Hi,<br>
<br>
Please find the latest report on new defect(s) introduced to<br>
ubuntu-xenial-kernel found with Coverity Scan.<br>
<br>
1 new defect(s) introduced to ubuntu-xenial-kernel found with Coverity Scan.<br>
<br>
<br>
New defect(s) Reported-by: Coverity Scan<br>
Showing 1 of 1 defect(s)<br>
<br>
<br>
** CID 1464330: Uninitialized variables (MISSING_RETURN)<br>
/arch/x86/net/bpf_jit_comp.c: 1088 in bpf_int_jit_compile()<br>
<br>
<br>
______________________________<wbr>______________________________<wbr>______________________________<wbr>______________<br>
*** CID 1464330: Uninitialized variables (MISSING_RETURN)<br>
/arch/x86/net/bpf_jit_comp.c: 1088 in bpf_int_jit_compile()<br>
1082 int i;<br>
1083 1084 if (!bpf_jit_enable)<br>
1085 return prog;<br>
1086 1087 if (!prog || !prog->len)<br>
>>> CID 1464330: Uninitialized variables (MISSING_RETURN)<br>
>>> Arriving at the end of a function without returning a value.<br>
1088 return;<br>
1089 1090 addrs = kmalloc(prog->len * sizeof(*addrs), GFP_KERNEL);<br>
1091 if (!addrs)<br>
1092 return prog;<br>
1093<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
kernel-team mailing list<br>
<a href="mailto:kernel-team@lists.ubuntu.com">kernel-team@lists.ubuntu.com</a><br>
<a href="https://lists.ubuntu.com/mailman/listinfo/kernel-team" rel="noreferrer" target="_blank">https://lists.ubuntu.com/<wbr>mailman/listinfo/kernel-team</a><br>
</font></span></blockquote></div><br></div>