]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.19.2/dvb-core-fix-bug-in-crc-32-checking-on-64-bit-systems.patch
drop tracing-add-module_description-to-preemptirq_delay_test.patch
[thirdparty/kernel/stable-queue.git] / releases / 2.6.19.2 / dvb-core-fix-bug-in-crc-32-checking-on-64-bit-systems.patch
1 From stable-bounces@linux.kernel.org Wed Jan 3 20:28:12 2007
2 Message-ID: <459C80A0.7080509@linuxtv.org>
3 Date: Wed, 03 Jan 2007 23:20:48 -0500
4 From: Michael Krufky <mkrufky@linuxtv.org>
5 To: stable@kernel.org
6 Cc: v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>, Ang Way Chuang <wcang@nrg.cs.usm.my>
7 Subject: dvb-core: fix bug in CRC-32 checking on 64-bit systems
8
9 From: Ang Way Chuang <wcang@nrg.cs.usm.my>
10
11 CRC-32 checking during ULE decapsulation always failed on x86_64 systems due
12 to the size of a variable used to store CRC. This bug was discovered on
13 Fedora Core 6 with kernel-2.6.18-1.2849. The i386 counterpart has no such
14 problem. This patch has been tested on 64-bit system as well as 32-bit system.
15
16 Signed-off-by: Ang Way Chuang <wcang@nrg.cs.usm.my>
17 Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
18 Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
19 Signed-off-by: Chris Wright <chrisw@sous-sol.org>
20 ---
21 (cherry picked from commit dedcefb085fe98a1feaf63590fe2fc7e0ecb1987)
22
23 drivers/media/dvb/dvb-core/dvb_net.c | 4 ++--
24 1 file changed, 2 insertions(+), 2 deletions(-)
25
26 --- linux-2.6.19.1.orig/drivers/media/dvb/dvb-core/dvb_net.c
27 +++ linux-2.6.19.1/drivers/media/dvb/dvb-core/dvb_net.c
28 @@ -604,7 +604,7 @@ static void dvb_net_ule( struct net_devi
29 { &utype, sizeof utype },
30 { priv->ule_skb->data, priv->ule_skb->len - 4 }
31 };
32 - unsigned long ule_crc = ~0L, expected_crc;
33 + u32 ule_crc = ~0L, expected_crc;
34 if (priv->ule_dbit) {
35 /* Set D-bit for CRC32 verification,
36 * if it was set originally. */
37 @@ -617,7 +617,7 @@ static void dvb_net_ule( struct net_devi
38 *((u8 *)priv->ule_skb->tail - 2) << 8 |
39 *((u8 *)priv->ule_skb->tail - 1);
40 if (ule_crc != expected_crc) {
41 - printk(KERN_WARNING "%lu: CRC32 check FAILED: %#lx / %#lx, SNDU len %d type %#x, ts_remain %d, next 2: %x.\n",
42 + printk(KERN_WARNING "%lu: CRC32 check FAILED: %08x / %08x, SNDU len %d type %#x, ts_remain %d, next 2: %x.\n",
43 priv->ts_count, ule_crc, expected_crc, priv->ule_sndu_len, priv->ule_sndu_type, ts_remain, ts_remain > 2 ? *(unsigned short *)from_where : 0);
44
45 #ifdef ULE_DEBUG