From: Michael Ellerman <michael@ellerman.id.au>
To: Thomas Klein <osstklei@de.ibm.com>
Cc: Thomas Klein <tklein@de.ibm.com>, Jeff Garzik <jeff@garzik.org>,
Jan-Bernd Themann <themann@de.ibm.com>,
netdev <netdev@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Stefan Roscher <ossrosch@linux.vnet.ibm.com>,
linux-ppc <linuxppc-dev@ozlabs.org>,
Christoph Raisch <raisch@de.ibm.com>,
Marcus Eder <meder@de.ibm.com>
Subject: Re: [PATCH 2.6.22-rc4] ehea: Fixed possible kernel panic on VLAN packet recv
Date: Thu, 07 Jun 2007 10:35:00 +1000 [thread overview]
Message-ID: <1181176500.4166.1.camel@concordia.ozlabs.ibm.com> (raw)
In-Reply-To: <200706062053.16986.osstklei@de.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 2127 bytes --]
On Wed, 2007-06-06 at 20:53 +0200, Thomas Klein wrote:
> This patch fixes a possible kernel panic due to not checking the vlan group
> when processing received VLAN packets and a malfunction in VLAN/hypervisor
> registration.
>
>
> Signed-off-by: Thomas Klein <tklein@de.ibm.com>
> ---
>
>
> diff -Nurp -X dontdiff linux-2.6.22-rc4/drivers/net/ehea/ehea.h patched_kernel/drivers/net/ehea/ehea.h
> --- linux-2.6.22-rc4/drivers/net/ehea/ehea.h 2007-06-05 02:57:25.000000000 +0200
> +++ patched_kernel/drivers/net/ehea/ehea.h 2007-06-06 12:53:58.000000000 +0200
> @@ -39,7 +39,7 @@
> #include <asm/io.h>
>
> #define DRV_NAME "ehea"
> -#define DRV_VERSION "EHEA_0061"
> +#define DRV_VERSION "EHEA_0064"
>
> #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \
> | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR)
> diff -Nurp -X dontdiff linux-2.6.22-rc4/drivers/net/ehea/ehea_main.c patched_kernel/drivers/net/ehea/ehea_main.c
> --- linux-2.6.22-rc4/drivers/net/ehea/ehea_main.c 2007-06-05 02:57:25.000000000 +0200
> +++ patched_kernel/drivers/net/ehea/ehea_main.c 2007-06-06 12:53:58.000000000 +0200
> @@ -1947,7 +1945,7 @@ static void ehea_vlan_rx_add_vid(struct
> }
>
> index = (vid / 64);
> - cb1->vlan_filter[index] |= ((u64)(1 << (vid & 0x3F)));
> + cb1->vlan_filter[index] |= ((u64)(0x8000000000000000 >> (vid & 0x3F)));
>
> hret = ehea_h_modify_ehea_port(adapter->handle, port->logical_port_id,
> H_PORT_CB1, H_PORT_CB1_ALL, cb1);
> @@ -1982,7 +1980,7 @@ static void ehea_vlan_rx_kill_vid(struct
> }
>
> index = (vid / 64);
> - cb1->vlan_filter[index] &= ~((u64)(1 << (vid & 0x3F)));
> + cb1->vlan_filter[index] &= ~((u64)(0x8000000000000000 >> (vid & 0x3F)));
These two seem ripe for splitting into some sort of helper routine.
Which would leave only one place to get it right.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-06-07 0:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-06 18:53 [PATCH 2.6.22-rc4] ehea: Fixed possible kernel panic on VLAN packet recv Thomas Klein
2007-06-07 0:35 ` Michael Ellerman [this message]
2007-06-07 8:14 ` Thomas Q Klein
2007-06-09 22:26 ` Jeff Garzik
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=1181176500.4166.1.camel@concordia.ozlabs.ibm.com \
--to=michael@ellerman.id.au \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=meder@de.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=ossrosch@linux.vnet.ibm.com \
--cc=osstklei@de.ibm.com \
--cc=raisch@de.ibm.com \
--cc=themann@de.ibm.com \
--cc=tklein@de.ibm.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).