From: Pete Zaitcev <zaitcev@redhat.com>
To: cohuck@de.ibm.com
Cc: netdev@oss.sgi.com, zaitcev@redhat.com
Subject: Bug in qeth in 2.6
Date: Wed, 3 Sep 2003 14:54:44 -0400 [thread overview]
Message-ID: <20030903145444.I27572@devserv.devel.redhat.com> (raw)
This code is obviously broken in case several cards are present,
look what happens to ``result''.
devices/s390/net/qeth.c:
static int
qeth_verify_dev(struct net_device *dev)
{
struct qeth_card *tmp;
int result = 0;
read_lock(&list_lock);
tmp = firstcard;
for (; tmp && (!result); tmp = tmp->next) {
if (atomic_read(&tmp->shutdown_phase))
continue;
result = (dev == tmp->dev)?
QETH_VERIFY_IS_REAL_DEV:__qeth_verify_dev_vlan(dev, tmp);
}
read_unlock(&list_lock);
return result;
}
Someone got seriously carried away with cleanups.
I have to say, I'm disappointed. The original qeth in 2.4
had poor C style, but it was a mistake to run amok adding
spaces. The diff between 2.4 and 2.6 is too hard to read,
even with -b. Now I have to review whole darn thing line by line.
Oh woe!
-- Pete
next reply other threads:[~2003-09-03 18:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-03 18:54 Pete Zaitcev [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-09-04 8:54 Bug in qeth in 2.6 Cornelia Huck
2003-09-04 15:45 ` Pete Zaitcev
2003-09-04 16:01 Cornelia Huck
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=20030903145444.I27572@devserv.devel.redhat.com \
--to=zaitcev@redhat.com \
--cc=cohuck@de.ibm.com \
--cc=netdev@oss.sgi.com \
/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;
as well as URLs for NNTP newsgroup(s).