Bug 723116

Summary: kickstartNetworkUp needs to check return value
Product: Red Hat Enterprise Linux 6 Reporter: Pavel Raiskup <praiskup>
Component: anacondaAssignee: Radek Vykydal <rvykydal>
Status: CLOSED DUPLICATE QA Contact: Release Test Team <release-test-team>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2CC: kdudka, praiskup, rvykydal
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-09 11:20:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Patch adding logging of network setup fail. none

Description Pavel Raiskup 2011-07-19 06:30:10 UTC
Error log from coverity difference scan rhel6.1/rhel6.2:

Error: CHECKED_RETURN:
/builddir/build/BUILD/anaconda-13.21.120/loader/loader.c:2262: check_return: Calling function "kickstartNetworkUp" without checking return value (as is done elsewhere 4 out of 5 times).
/builddir/build/BUILD/anaconda-13.21.120/loader/loader.c:192: example_checked: "kickstartNetworkUp(loaderData, &iface)" has its value checked in "kickstartNetworkUp(loaderData, &iface)".
/builddir/build/BUILD/anaconda-13.21.120/loader/urlinstall.c:325: example_checked: "kickstartNetworkUp(loaderData, &iface)" has its value checked in "kickstartNetworkUp(loaderData, &iface)".
/builddir/build/BUILD/anaconda-13.21.120/loader/nfsinstall.c:437: example_checked: "kickstartNetworkUp(loaderData, &iface)" has its value checked in "kickstartNetworkUp(loaderData, &iface)".
/builddir/build/BUILD/anaconda-13.21.120/loader/telnetd.c:238: example_checked: "kickstartNetworkUp(loaderData, &iface)" has its value checked in "kickstartNetworkUp(loaderData, &iface)".
/builddir/build/BUILD/anaconda-13.21.120/loader/loader.c:2262: unchecked_value: No check of the return value of "kickstartNetworkUp(&loaderData, &iface)".

Version-Release number of selected component (if applicable):

anaconda-13.21.120-1.el6

Comment 2 Radek Vykydal 2011-07-19 11:30:21 UTC
Created attachment 513776 [details]
Patch adding logging of network setup fail.

Although I don't think that the respective code has changed since 6.1 I can make coverity happy by this safe and simple patch adding logging of kickstartNetworkUp fail. The logging is reasonable in this case (it is not just "shut up coverity" patch).

Comment 3 Radek Vykydal 2011-07-19 11:45:44 UTC
(In reply to comment #2)

> Although I don't think that the respective code has changed since 6.1 I can
> make coverity happy by this safe and simple patch 

Well, the safe and simple patch has copy&paste bug (missing '&').

Comment 4 Kamil Dudka 2011-08-09 11:20:46 UTC

*** This bug has been marked as a duplicate of bug 727881 ***