From: "dan carpenter" <error27@email.com>
To: smatch-kbugs@lists.sourceforge.net
Cc: R.E.Wolff@BitWizard.nl, linux-serial@vger.kernel.org
Subject: 2.5.33 drivers/char/ dereference test
Date: Sat, 31 Aug 2002 23:56:26 -0500 [thread overview]
Message-ID: <20020901045625.28999.qmail@email.com> (raw)
Smatch is an open source code checker under initial development.
(smatch.sf.net)
These potential errors were found using the
http://smatch.sourceforge.net/scripts/dereference-test.pl.txt
script and I have attempted to hand verify them.
"If you say " if (foo) { ... } foo->bar " then this script marks that as an error."
regards,
dan carpenter
===================================================
linux-2.5.33/drivers/char/amiserial.c
459 if (info->tty)
460 tty_hangup(info->tty);
461 }
462 }
463 if (info->flags & ASYNC_CTS_FLOW) {
464 if (info->tty->hw_stopped) {
(I'm not sure if this is an error. It looks very suspicious
if info->flags has both the ASYNC_CTS_FLOW and ASYNC_CHECK_CD
bits set)
linux-2.5.33/drivers/char/epca.c
78 #define epcaassert(x, msg) if (!(x)) epca_error(__LINE__, msg)
...
2682 epcaassert(bc !=0, "bc out of range");
...
2692 bc->rout = cmdHead;
(epca_error() should probably be a panic rather than just printing
a msg)
linux-2.5.33/drivers/char/epca.c
2862 if (tty)
2863 ts = tty->termios;
...
2899 if (tty->flip.count == TTY_FLIPBUF_SIZE)
2900 return;
linux-2.5.33/drivers/char/generic_serial.c
926 if ((!old_termios ||
927 (old_termios->c_cflag & CRTSCTS)) &&
928 !( tiosp->c_cflag & CRTSCTS)) {
929 tty->stopped = 0;
930 gs_start(tty);
931 }
932
933 #ifdef tytso_patch_94Nov25_1726
934 /* This "makes sense", Why is it commented out? */
935
936 if (!(old_termios->c_cflag & CLOCAL) &&
937 (tty->termios->c_cflag & CLOCAL))
938 wake_up_interruptible(&info->open_wait);
(The script didn't actually find this bug because it is ifdef out.
I happenned to notice it while looking at false positives. I should
be something like if (old_termios && !(old_termios->c_cflag & CLOCAL)
&& ...) )
linux-2.5.33/drivers/char/synclink.c
1382 if (info->tty)
1383 tty_hangup(info->tty);
1384 }
1385 }
1386
1387 if ( (info->flags & ASYNC_CTS_FLOW) &&
1388 (status & MISCSTATUS_CTS_LATCHED) ) {
1389 if (info->tty->hw_stopped) {
(I'm not sure if this is an error. It looks very suspicious
if info->flags has both the ASYNC_CTS_FLOW and ASYNC_CHECK_CD
bits set)
--
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup
reply other threads:[~2002-09-01 4:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20020901045625.28999.qmail@email.com \
--to=error27@email.com \
--cc=R.E.Wolff@BitWizard.nl \
--cc=linux-serial@vger.kernel.org \
--cc=smatch-kbugs@lists.sourceforge.net \
/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.