All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Schmidt <stefan@osg.samsung.com>
To: linux-wpan@vger.kernel.org
Cc: Alexander Aring <alex.aring@gmail.com>
Subject: Re: [PATCH wpan-tools 0/4] Coverity fixes for wpan-ping
Date: Thu, 12 Nov 2015 09:39:32 +0100	[thread overview]
Message-ID: <56445044.60901@osg.samsung.com> (raw)
In-Reply-To: <1447191756-15928-1-git-send-email-stefan@osg.samsung.com>

Hello.

On 10/11/15 22:42, Stefan Schmidt wrote:
> Hello.
>
> I finished setting up Travis CI for builds and Coverity Scan service for wpan-tools on a private
> GitHub fork. If nobody has a strong opinion against this I would like to set it up on the main repo
> so we can have a first step towards some automated QA infrastructure.

This is done now. Will send a separate mail with more details about it.

> But lets first have a look at the results from this first run. As you can see on the our first
> run revealed 4 defects in 23321 lines of code (after the C preprocessor). With a defect density
> of 0.17 this is way below industry average which is set to one here. In other words this means
> we only have 1.7 defects per 10000 lines of code.
>
> Three of these have been problems in error pathes of the code (leak, no check on return value, etc)
> and one have been a false positive in the main iwpan.c file. Coverity was not able to understand
> that we set err in our netlinks callbacks and thought this code bit would never stop as we start
> with err = 1
>
> while (err > 0)
> 	nl_recvmsgs(state->nl_sock, cb);
>
> I marked it as false positive and fixed the remaining three defects with the patches below.
>
> Stefan Schmidt (4):
>    wpan-ping: remove unused struct sockaddr_nl variable
>    wpan-ping: check return value for setsockopt
>    wpan-ping: do not try to send data back to origin if we got an error
>      from recvfrom
>    wpan-ping: avoid leaking socket handle on error path
>
>   wpan-ping/wpan-ping.c | 9 +++++++--
>   1 file changed, 7 insertions(+), 2 deletions(-)
>

Pushed these now.

regards
Stefan Schmidt

      parent reply	other threads:[~2015-11-12  8:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10 21:42 [PATCH wpan-tools 0/4] Coverity fixes for wpan-ping Stefan Schmidt
2015-11-10 21:42 ` [PATCH wpan-tools 1/4] wpan-ping: remove unused struct sockaddr_nl variable Stefan Schmidt
2015-11-10 21:42 ` [PATCH wpan-tools 2/4] wpan-ping: check return value for setsockopt Stefan Schmidt
2015-11-10 21:42 ` [PATCH wpan-tools 3/4] wpan-ping: do not try to send data back to origin if we got an error from recvfrom Stefan Schmidt
2015-11-10 21:42 ` [PATCH wpan-tools 4/4] wpan-ping: avoid leaking socket handle on error path Stefan Schmidt
2015-11-12  8:39 ` Stefan Schmidt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56445044.60901@osg.samsung.com \
    --to=stefan@osg.samsung.com \
    --cc=alex.aring@gmail.com \
    --cc=linux-wpan@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.