From: Denis Vlasenko <vda@ilport.com.ua>
To: "Cipriani, Lawrence V (Larry)" <lvc@lucent.com>
Cc: "David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
kai.germaschewski@gmx.de, linux-dvb-maintainer@linuxtv.org
Subject: [PATCH] Re: bugs in /usr/src/linux/net/ipv6/mcast.c
Date: Thu, 17 Nov 2005 15:00:06 +0200 [thread overview]
Message-ID: <200511171500.06910.vda@ilport.com.ua> (raw)
In-Reply-To: <0C6AA2145B810F499C69B0947DC5078107BCDE20@oh0012exch001p.cb.lucent.com>
[-- Attachment #1: Type: text/plain, Size: 506 bytes --]
[CC: added to respective maintainers]
On Thursday 17 November 2005 00:24, Cipriani, Lawrence V (Larry) wrote:
>
> Thanks. We're on 2.4.x For what it's worth, here are a few more I found:
As far as I can see, none of these exist in 2.6.
(BTW, how did you find them? That one with multi line 'while'
is hard to find with grep)
However, a few similar bugs do exist in 2.6!
Patch attached.
Patch intentionally places a comment instead of statement
in few false positives.
Please review/apply.
--
vda
[-- Attachment #2: linux-2.6.14.semicolon_fix.diff --]
[-- Type: text/x-diff, Size: 3334 bytes --]
diff -urpN linux-2.6.14.org/drivers/isdn/capi/capiutil.c linux-2.6.14.semicolon_fix/drivers/isdn/capi/capiutil.c
--- linux-2.6.14.org/drivers/isdn/capi/capiutil.c Mon Aug 29 02:41:01 2005
+++ linux-2.6.14.semicolon_fix/drivers/isdn/capi/capiutil.c Thu Nov 17 14:41:58 2005
@@ -404,7 +404,8 @@ static unsigned command_2_index(unsigned
{
if (c & 0x80)
c = 0x9 + (c & 0x0f);
- else if (c <= 0x0f);
+ else if (c <= 0x0f)
+ /* do nothing */;
else if (c == 0x41)
c = 0x9 + 0x1;
else if (c == 0xff)
diff -urpN linux-2.6.14.org/drivers/media/dvb/frontends/ves1820.c linux-2.6.14.semicolon_fix/drivers/media/dvb/frontends/ves1820.c
--- linux-2.6.14.org/drivers/media/dvb/frontends/ves1820.c Sat Nov 5 15:17:30 2005
+++ linux-2.6.14.semicolon_fix/drivers/media/dvb/frontends/ves1820.c Thu Nov 17 14:41:05 2005
@@ -140,25 +140,25 @@ static int ves1820_set_symbolrate(struct
/* yeuch! */
fpxin = state->config->xin * 10;
fptmp = fpxin; do_div(fptmp, 123);
- if (symbolrate < fptmp);
+ if (symbolrate < fptmp)
SFIL = 1;
fptmp = fpxin; do_div(fptmp, 160);
- if (symbolrate < fptmp);
+ if (symbolrate < fptmp)
SFIL = 0;
fptmp = fpxin; do_div(fptmp, 246);
- if (symbolrate < fptmp);
+ if (symbolrate < fptmp)
SFIL = 1;
fptmp = fpxin; do_div(fptmp, 320);
- if (symbolrate < fptmp);
+ if (symbolrate < fptmp)
SFIL = 0;
fptmp = fpxin; do_div(fptmp, 492);
- if (symbolrate < fptmp);
+ if (symbolrate < fptmp)
SFIL = 1;
fptmp = fpxin; do_div(fptmp, 640);
- if (symbolrate < fptmp);
+ if (symbolrate < fptmp)
SFIL = 0;
fptmp = fpxin; do_div(fptmp, 984);
- if (symbolrate < fptmp);
+ if (symbolrate < fptmp)
SFIL = 1;
fin = state->config->xin >> 4;
diff -urpN linux-2.6.14.org/drivers/net/tokenring/ibmtr.c linux-2.6.14.semicolon_fix/drivers/net/tokenring/ibmtr.c
--- linux-2.6.14.org/drivers/net/tokenring/ibmtr.c Sat Nov 5 15:17:37 2005
+++ linux-2.6.14.semicolon_fix/drivers/net/tokenring/ibmtr.c Thu Nov 17 14:42:56 2005
@@ -610,8 +610,10 @@ static int __devinit ibmtr_probe1(struct
ti->mapped_ram_size= /*sixteen to onehundredtwentyeight 512byte blocks*/
1<< ((readb(ti->mmio+ACA_OFFSET+ACA_RW+RRR_ODD) >> 2 & 0x03) + 4);
ti->page_mask = 0;
- if (ti->turbo) ti->page_mask=0xf0;
- else if (ti->shared_ram_paging == 0xf); /* No paging in adapter */
+ if (ti->turbo)
+ ti->page_mask=0xf0;
+ else if (ti->shared_ram_paging == 0xf)
+ /* No paging in adapter */;
else {
#ifdef ENABLE_PAGING
unsigned char pg_size = 0;
diff -urpN linux-2.6.14.org/net/netrom/nr_in.c linux-2.6.14.semicolon_fix/net/netrom/nr_in.c
--- linux-2.6.14.org/net/netrom/nr_in.c Sat Nov 5 15:18:17 2005
+++ linux-2.6.14.semicolon_fix/net/netrom/nr_in.c Thu Nov 17 14:43:53 2005
@@ -99,7 +99,7 @@ static int nr_state1_machine(struct sock
break;
case NR_RESET:
- if (sysctl_netrom_reset_circuit);
+ if (sysctl_netrom_reset_circuit)
nr_disconnect(sk, ECONNRESET);
break;
@@ -130,7 +130,7 @@ static int nr_state2_machine(struct sock
break;
case NR_RESET:
- if (sysctl_netrom_reset_circuit);
+ if (sysctl_netrom_reset_circuit)
nr_disconnect(sk, ECONNRESET);
break;
@@ -265,7 +265,7 @@ static int nr_state3_machine(struct sock
break;
case NR_RESET:
- if (sysctl_netrom_reset_circuit);
+ if (sysctl_netrom_reset_circuit)
nr_disconnect(sk, ECONNRESET);
break;
next prev parent reply other threads:[~2005-11-17 13:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-16 22:24 bugs in /usr/src/linux/net/ipv6/mcast.c Cipriani, Lawrence V (Larry)
2005-11-17 13:00 ` Denis Vlasenko [this message]
2005-11-20 2:01 ` [linux-dvb-maintainer] [PATCH] " Johannes Stezenbach
2005-11-20 11:27 ` Denis Vlasenko
2005-11-21 2:19 ` Johannes Stezenbach
2005-11-17 13:46 ` Denis Vlasenko
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=200511171500.06910.vda@ilport.com.ua \
--to=vda@ilport.com.ua \
--cc=akpm@osdl.org \
--cc=davem@davemloft.net \
--cc=kai.germaschewski@gmx.de \
--cc=linux-dvb-maintainer@linuxtv.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lvc@lucent.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