Bug 723116 - kickstartNetworkUp needs to check return value
Summary: kickstartNetworkUp needs to check return value
Keywords:
Status: CLOSED DUPLICATE of bug 727881
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: anaconda
Version: 6.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Radek Vykydal
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-19 06:30 UTC by Pavel Raiskup
Modified: 2011-08-09 11:20 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-09 11:20:46 UTC
Target Upstream Version:


Attachments (Terms of Use)
Patch adding logging of network setup fail. (807 bytes, text/plain)
2011-07-19 11:30 UTC, Radek Vykydal
no flags Details

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 ***


Note You need to log in before you can comment on or make changes to this bug.