From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Oleg Drokin <green@linuxhacker.ru>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: 2.4.21-pre4 comparison bugs (Even More Again)
Date: 09 Feb 2003 21:59:32 +0000 [thread overview]
Message-ID: <1044827971.30767.1.camel@irongate.swansea.linux.org.uk> (raw)
In-Reply-To: <20030209182251.GA21226@linuxhacker.ru>
On Sun, 2003-02-09 at 18:22, Oleg Drokin wrote:
> Hello!
>
> Ok. In addition to "unsigned_var < 0" kind of error checks that
> never work, there is different non-working kind of checks:
> "pointer < 0".
> We can see these at:
> drivers/char/joystick/tmdc.c:318 if (tmdc->abs[i] < 0) continue;
> drivers/char/epca.c:3758 if (board.port <= 0)
> drivers/char/epca.c:3770 if (board.membase <= 0)
> drivers/media/radio/radio-cadet.c:541 if(request_region(io,2, "cadet-probe")>=0) {
> drivers/net/wan/dscc4.c:1760 if (dscc4_init_dummy_skb(dpriv) < 0)
>
> Given the fact that you seem not to like casts to signed int,
> how do you propose to fix these?
By actually going and reading the drivers to see why the errors occur
and if they are meaningful. You need to know the possible returns and
the intent of those returns.
Eg radio-cadet request region appears not be a cast problem but a
complete misunderstanding of the return codes. Likewise epca it looks
like the board.port/board.membase are just overbroad checks and in fact
harmless.
next prev parent reply other threads:[~2003-02-09 20:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-08 17:18 2.4.21-pre4 comparison bugs Oleg Drokin
2003-02-08 23:25 ` J.A. Magallon
2003-02-17 2:10 ` Bill Davidsen
2003-02-09 0:58 ` Alan Cox
2003-02-09 17:53 ` 2.4.21-pre4 comparison bugs (More of those) Oleg Drokin
2003-02-09 18:22 ` 2.4.21-pre4 comparison bugs (Even More Again) Oleg Drokin
2003-02-09 21:59 ` Alan Cox [this message]
2003-02-09 22:01 ` 2.4.21-pre4 comparison bugs (More of those) Alan Cox
2003-02-10 7:06 ` Oleg Drokin
2003-02-09 16:54 ` 2.4.21-pre4 more extra semicolons bugs Oleg Drokin
2003-02-09 16:59 ` 2.4.21-pre4 - two simple compile fixes Oleg Drokin
2003-02-09 22:02 ` Alan Cox
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=1044827971.30767.1.camel@irongate.swansea.linux.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=green@linuxhacker.ru \
--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®