From: Rusty Russell <rusty@rustcorp.com.au>
To: Dawson Engler <engler@csl.Stanford.EDU>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [CHECKER] question about functions that can fail
Date: Thu, 22 Mar 2001 09:09:21 +1100 [thread overview]
Message-ID: <m14fqnB-001PKiC@mozart> (raw)
In-Reply-To: Your message of "Mon, 19 Mar 2001 13:49:01 -0800." <200103192149.NAA29973@csl.Stanford.EDU>
In message <200103192149.NAA29973@csl.Stanford.EDU> you write:
> skb_queue_len : 56 : 2:
skb_queue_len not being checked? Look at these two places: either
your analysis has a bug, or there's some wierd code...
skb_push and skb_pull return the new skb data region, but have more
important side effects. All these three can never error.
> get_tuple : 44 : 5:
pcmcia code, or netfilter code? netfilter code always checks...
> mod_timer : 13 : 163:
This is OK. Most people don't care if mod_timer had to delete the old
timer or not.
> del_timer : 36 : 444:
Whether ignoring this is OK or not is tricky. If del_timer returns
false, you either never added the timer, it has already finished, or
it is running *now* (SMP). Hence touching the timer struct contents
after an unchecked del_timer is v. v. suspect, eg:
del_timer(&mytimer);
kfree(mytimer->data);
Or an unchecked del_timer in module unload. del_timer_sync on the
other hand, is safe.
Keep up the great work!
Rusty.
--
Premature optmztion is rt of all evl. --DK
prev parent reply other threads:[~2001-03-23 12:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-19 21:49 Dawson Engler
2001-03-19 22:23 ` Andreas Dilger
2001-03-21 22:09 ` Rusty Russell [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=m14fqnB-001PKiC@mozart \
--to=rusty@rustcorp.com.au \
--cc=engler@csl.Stanford.EDU \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®