[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#269134: marked as done (kernel-image-2.6.8-1-686: include capi fix into next kernel-source-2.6.8)



Your message dated Mon, 13 Sep 2004 16:02:40 -0400
with message-id <E1C6x28-0003oZ-00@newraff.debian.org>
and subject line Bug#269134: fixed in kernel-source-2.6.8 2.6.8-6
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 30 Aug 2004 23:41:13 +0000
>From ach@mpe.mpg.de Mon Aug 30 16:41:13 2004
Return-path: <ach@mpe.mpg.de>
Received: from mpehp1.mpe-garching.mpg.de [130.183.70.10] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1C1vlw-0003iR-00; Mon, 30 Aug 2004 16:41:12 -0700
Received: from [127.0.0.1] (allee.exgal.mpe.mpg.de [130.183.74.28])
	by mpehp1.mpe-garching.mpg.de (8.9.3 (PHNE_25183+JAGae58098)/8.9.3) with ESMTP id BAA06512
	for <submit@bugs.debian.org>; Tue, 31 Aug 2004 01:40:40 +0200 (METDST)
Message-Id: <200408302340.BAA06512@mpehp1.mpe-garching.mpg.de>
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Achim Bohnet <ach@mpe.mpg.de>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: kernel-image-2.6.8-1-686: include capi fix into next kernel-source-2.6.8
X-Mailer: reportbug 2.63
Date: Tue, 31 Aug 2004 01:40:39 +0200
X-Debbugs-Cc: ach@mpe.mpg.de
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-11.0 required=4.0 tests=BAYES_00,HAS_PACKAGE,
	X_DEBBUGS_CC autolearn=ham version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

Package: kernel-image-2.6.8-1-686
Version: 2.6.8-2
Severity: wishlist
Tags: patch

I had several CAPI related problems. With kernel-source-2.6.8-5 +
capi-oops patch, CAPI work fine again.  Would be nice to get a
working CAPI subsystem in sarge.

Other users reported success with this patch
too on the linux-avmb1@mlists.in-berlin.de mailing list.
Carsten Paeth wrote on linux-avmb1:
---snip---
Hello.

There are several oops with capi in 2.6 kernels:
- oops in skb_dequeue under heavy data load
- kernel message: "BUG: dst underflow 0: xxxxxxx"
- kernel message: "BUG: dst underflow 0: xxxxxxx at xxxxxxx"
- problems with chan_capi and asterisk and AVM cards

The problem is that the low level send_message function in 
the capi hardware drivers free the skb when an error occured.
This is wrong. This bug is in the kernel since transfering
the handling of msgidqueue from kcapi.c to the low level
hardware drivers.

!!!! The skb should only be consumed when CAPI_NOERROR is returned !!!!

The attached patch fixes all that problems.

best regards,

calle
---snap---

For convinience I append the patch I download from linux2.5 bk
and applied to 2.6.8 kernel-source.

Achim

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/08/27 14:55:01-07:00 armin@melware.de 
#   [PATCH] 2.6 ISDN CAPI: low-level drivers skb free fix
#   
#   CAPI skb freeing fix. On sending, the hardware/low-level
#   driver may free a skb on no error only. The application/core
#   side must take care otherwise.
#   
#   Author: Carsten Paeth, Armin Schindler
# 
# drivers/isdn/capi/capidrv.c
#   2004/08/27 12:27:24-07:00 armin@melware.de +2 -1
#   2.6 ISDN CAPI: low-level drivers skb free fix
# 
# drivers/isdn/hardware/avm/b1.c
#   2004/08/27 12:51:03-07:00 armin@melware.de +3 -5
#   2.6 ISDN CAPI: low-level drivers skb free fix
# 
# drivers/isdn/hardware/avm/b1dma.c
#   2004/08/27 12:51:03-07:00 armin@melware.de +0 -2
#   2.6 ISDN CAPI: low-level drivers skb free fix
# 
# drivers/isdn/hardware/avm/c4.c
#   2004/08/27 12:51:03-07:00 armin@melware.de +0 -2
#   2.6 ISDN CAPI: low-level drivers skb free fix
# 
# drivers/isdn/hardware/avm/t1isa.c
#   2004/08/27 12:51:03-07:00 armin@melware.de +3 -4
#   2.6 ISDN CAPI: low-level drivers skb free fix
# 
# drivers/isdn/hardware/eicon/capifunc.c
#   2004/08/27 12:57:40-07:00 armin@melware.de +3 -2
#   2.6 ISDN CAPI: low-level drivers skb free fix
# 
diff -Nru a/drivers/isdn/capi/capidrv.c b/drivers/isdn/capi/capidrv.c
--- a/drivers/isdn/capi/capidrv.c	2004-08-30 14:50:12 -07:00
+++ b/drivers/isdn/capi/capidrv.c	2004-08-30 14:50:12 -07:00
@@ -512,7 +512,8 @@
 	len = CAPIMSG_LEN(cmsg->buf);
 	skb = alloc_skb(len, GFP_ATOMIC);
 	memcpy(skb_put(skb, len), cmsg->buf, len);
-	capi20_put_message(&global.ap, skb);
+	if (capi20_put_message(&global.ap, skb) != CAPI_NOERROR)
+		kfree_skb(skb);
 }
 
 /* -------- state machine -------------------------------------------- */
diff -Nru a/drivers/isdn/hardware/avm/b1.c b/drivers/isdn/hardware/avm/b1.c
--- a/drivers/isdn/hardware/avm/b1.c	2004-08-30 14:50:12 -07:00
+++ b/drivers/isdn/hardware/avm/b1.c	2004-08-30 14:50:13 -07:00
@@ -389,7 +389,7 @@
 					     CAPIMSG_NCCI(skb->data),
 					     CAPIMSG_MSGID(skb->data));
 		if (retval != CAPI_NOERROR) 
-			goto out;
+			return retval;
 
 		dlen = CAPIMSG_DATALEN(skb->data);
 
@@ -399,16 +399,14 @@
 		b1_put_slice(port, skb->data + len, dlen);
 		spin_unlock_irqrestore(&card->lock, flags);
 	} else {
-		retval = CAPI_NOERROR;
-
 	 	spin_lock_irqsave(&card->lock, flags);
 		b1_put_byte(port, SEND_MESSAGE);
 		b1_put_slice(port, skb->data, len);
 		spin_unlock_irqrestore(&card->lock, flags);
 	}
- out:
+
 	dev_kfree_skb_any(skb);
-	return retval;
+	return CAPI_NOERROR;
 }
 
 /* ------------------------------------------------------------- */
diff -Nru a/drivers/isdn/hardware/avm/b1dma.c b/drivers/isdn/hardware/avm/b1dma.c
--- a/drivers/isdn/hardware/avm/b1dma.c	2004-08-30 14:50:12 -07:00
+++ b/drivers/isdn/hardware/avm/b1dma.c	2004-08-30 14:50:12 -07:00
@@ -839,8 +839,6 @@
 	}
 	if (retval == CAPI_NOERROR) 
 		b1dma_queue_tx(card, skb);
-	else
-		dev_kfree_skb_any(skb);
 
 	return retval;
 }
diff -Nru a/drivers/isdn/hardware/avm/c4.c b/drivers/isdn/hardware/avm/c4.c
--- a/drivers/isdn/hardware/avm/c4.c	2004-08-30 14:50:12 -07:00
+++ b/drivers/isdn/hardware/avm/c4.c	2004-08-30 14:50:12 -07:00
@@ -1029,8 +1029,6 @@
 		spin_lock_irqsave(&card->lock, flags);
 		c4_dispatch_tx(card);
 		spin_unlock_irqrestore(&card->lock, flags);
-	} else {
-		dev_kfree_skb_any(skb);
 	}
 	return retval;
 }
diff -Nru a/drivers/isdn/hardware/avm/t1isa.c b/drivers/isdn/hardware/avm/t1isa.c
--- a/drivers/isdn/hardware/avm/t1isa.c	2004-08-30 14:50:12 -07:00
+++ b/drivers/isdn/hardware/avm/t1isa.c	2004-08-30 14:50:12 -07:00
@@ -472,7 +472,7 @@
 					     CAPIMSG_NCCI(skb->data),
 					     CAPIMSG_MSGID(skb->data));
 		if (retval != CAPI_NOERROR) 
-			goto out;
+			return retval;
 
 		dlen = CAPIMSG_DATALEN(skb->data);
 
@@ -482,16 +482,15 @@
 		t1_put_slice(port, skb->data + len, dlen);
 		spin_unlock_irqrestore(&card->lock, flags);
 	} else {
-		retval = CAPI_NOERROR;
 
 		spin_lock_irqsave(&card->lock, flags);
 		b1_put_byte(port, SEND_MESSAGE);
 		t1_put_slice(port, skb->data, len);
 		spin_unlock_irqrestore(&card->lock, flags);
 	}
- out:
+
 	dev_kfree_skb_any(skb);
-	return retval;
+	return CAPI_NOERROR;
 }
 /* ------------------------------------------------------------- */
 
diff -Nru a/drivers/isdn/hardware/eicon/capifunc.c b/drivers/isdn/hardware/eicon/capifunc.c
--- a/drivers/isdn/hardware/eicon/capifunc.c	2004-08-30 14:50:12 -07:00
+++ b/drivers/isdn/hardware/eicon/capifunc.c	2004-08-30 14:50:12 -07:00
@@ -1,4 +1,4 @@
-/* $Id: capifunc.c,v 1.61.4.2 2004/05/05 16:09:25 armin Exp $
+/* $Id: capifunc.c,v 1.61.4.5 2004/08/27 20:10:12 armin Exp $
  *
  * ISDN interface module for Eicon active cards DIVA.
  * CAPI Interface common functions
@@ -998,7 +998,8 @@
 
       write_end:
 	diva_os_leave_spin_lock(&api_lock, &old_irql, "send message");
-	diva_os_free_message_buffer(dmb);
+	if (retval == CAPI_NOERROR)
+		diva_os_free_message_buffer(dmb);
 	return retval;
 }
 

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (100, 'testing'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-1-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8

Versions of packages kernel-image-2.6.8-1-686 depends on:
ii  coreutils [fileutils]         5.2.1-2    The GNU core utilities
ii  fileutils                     5.2.1-2    The GNU file management utilities 
ii  initrd-tools                  0.1.73     tools to create initrd image for p
ii  module-init-tools             3.1-pre5-6 tools for managing Linux kernel mo

-- no debconf information

---------------------------------------
Received: (at 269134-close) by bugs.debian.org; 13 Sep 2004 20:08:15 +0000
>From katie@ftp-master.debian.org Mon Sep 13 13:08:15 2004
Return-path: <katie@ftp-master.debian.org>
Received: from newraff.debian.org [208.185.25.31] (mail)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1C6x7X-0004tC-00; Mon, 13 Sep 2004 13:08:15 -0700
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
	id 1C6x28-0003oZ-00; Mon, 13 Sep 2004 16:02:40 -0400
From: Joshua Kwan <joshk@triplehelix.org>
To: 269134-close@bugs.debian.org
X-Katie: $Revision: 1.51 $
Subject: Bug#269134: fixed in kernel-source-2.6.8 2.6.8-6
Message-Id: <E1C6x28-0003oZ-00@newraff.debian.org>
Sender: Archive Administrator <katie@ftp-master.debian.org>
Date: Mon, 13 Sep 2004 16:02:40 -0400
Delivered-To: 269134-close@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 
X-CrossAssassin-Score: 6

Source: kernel-source-2.6.8
Source-Version: 2.6.8-6

We believe that the bug you reported is fixed in the latest version of
kernel-source-2.6.8, which is due to be installed in the Debian FTP archive:

kernel-doc-2.6.8_2.6.8-6_all.deb
  to pool/main/k/kernel-source-2.6.8/kernel-doc-2.6.8_2.6.8-6_all.deb
kernel-patch-debian-2.6.8_2.6.8-6_all.deb
  to pool/main/k/kernel-source-2.6.8/kernel-patch-debian-2.6.8_2.6.8-6_all.deb
kernel-source-2.6.8_2.6.8-6.diff.gz
  to pool/main/k/kernel-source-2.6.8/kernel-source-2.6.8_2.6.8-6.diff.gz
kernel-source-2.6.8_2.6.8-6.dsc
  to pool/main/k/kernel-source-2.6.8/kernel-source-2.6.8_2.6.8-6.dsc
kernel-source-2.6.8_2.6.8-6_all.deb
  to pool/main/k/kernel-source-2.6.8/kernel-source-2.6.8_2.6.8-6_all.deb
kernel-tree-2.6.8_2.6.8-6_all.deb
  to pool/main/k/kernel-source-2.6.8/kernel-tree-2.6.8_2.6.8-6_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 269134@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Joshua Kwan <joshk@triplehelix.org> (supplier of updated kernel-source-2.6.8 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon,  6 Sep 2004 21:28:18 -0700
Source: kernel-source-2.6.8
Binary: kernel-source-2.6.8 kernel-doc-2.6.8 kernel-tree-2.6.8 kernel-patch-debian-2.6.8
Architecture: source all
Version: 2.6.8-6
Distribution: unstable
Urgency: medium
Maintainer: Debian kernel team <debian-kernel@lists.debian.org>
Changed-By: Joshua Kwan <joshk@triplehelix.org>
Description: 
 kernel-doc-2.6.8 - Linux kernel specific documentation for version 2.6.8
 kernel-patch-debian-2.6.8 - Debian patches to Linux 2.6.8
 kernel-source-2.6.8 - Linux kernel source for version 2.6.8 with Debian patches
 kernel-tree-2.6.8 - Linux kernel tree for building prepackaged Debian kernel images
Closes: 221813 258676 261195 267655 268871 269134 270102
Changes: 
 kernel-source-2.6.8 (2.6.8-6) unstable; urgency=medium
 .
   * reiserfs xattr/acl fix if root fs (Max Attems).
 .
   * fix /proc/net/netstat output for `netstat -s` (Max Attems).
 .
   * Add missing intel CPU descriptors (Max Attems).
 .
   * Revert changelog.dpatch that was silently added (Christoph Hellwig).
 .
   * JFS: fix memory leak (Max Attems).
 .
   * Add sis900 phy (Max Attems).
 .
   * Fix bad URL in BSD acct help entry (closes: #268871) (Max Attems).
 .
   * Mark CONFIG_DIGI broken (closes: #258676) (Christoph Hellwig).
 .
   * Fix devfs name for microcode driver (closes: #221813) (Christoph Hellwig).
 .
   * Fix loop on hfs/hfsplus (closes: #261195) (Christoph Hellwig).
 .
   * Fix default kernel boot args on openfirmware powerpc (Sven Luther).
 .
   * Add CAPI skb freeing fix (closes: #269134) (Christoph Hellwig).
 .
   * Update debian/apply from 2.4 to allow us to base prune-non-free on
     file removals in the patch series. (Closes: #267655)
 .
   * Make sure SCSI disk caches are flushed on shutdown (Christoph Hellwig).
 .
   * Handle loaded but no hardware present properly in aic79xx (closes: 270102)
     (Christoph Hellwig).
 .
   * Export proper PCI ID table to hotplug in aic7xxx/aic79xx
     (Christoph Hellwig).
 .
   * Add a patch by davem which suppresses a loop when reading from openpromfs.
     (Joshua Kwan)
 .
   * Set all files in the patch dir non-executable.
Files: 
 ac993417174f3124907c50047a93c44a 1645 devel optional kernel-source-2.6.8_2.6.8-6.dsc
 3b64faa9f86cf98fc9888032af39ded4 585524 devel optional kernel-source-2.6.8_2.6.8-6.diff.gz
 02787760574cfed128de47a2151332b1 511512 devel optional kernel-patch-debian-2.6.8_2.6.8-6_all.deb
 e5137ad738f9d4cc9fdd869d66830469 34858086 devel optional kernel-source-2.6.8_2.6.8-6_all.deb
 6a3af718b6573e8d2509675b4c5b44d9 20908 devel optional kernel-tree-2.6.8_2.6.8-6_all.deb
 6485c76cc203c932f19126a4494ade3c 6226554 doc optional kernel-doc-2.6.8_2.6.8-6_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: http://triplehelix.org/~joshk/pubkey_gpg.asc

iQIVAwUBQUX2VKOILr94RG8mAQIQ/g/+Mt9DJp/xLxC67XtYJqaUGxb/SdsbxB0G
CmuuDYSnGbpd/dIpzLbX+K4hgOMhOIZUnMXBzlMYPxXVJyearm5XFZWq0lyxEctZ
B/85fNwh3i3w3/rrO3JMbL3JjTTbxh50uoC4zpvA+ivaVDbtkh3jjHcEUXAbVSG6
+Rdjrmdz+cbkvTE61TVedsVrrkZ9kZmmNFpZ3nYss/3tjjUOsnFXHtJhX2XjOJ5E
SMhGm5P29Mg2sXVGCGB5FAefK042NOjbIcAQW81jkQbSudzm4gyxhApen3Qd8OPo
nWSqy1sVyY/jHR/okgvV2MQvKbDphaqy5/dFSPJMza5OCwW8pRLpdoYVRc8FSoAU
DheihSjjyz8inR05IHk2/bivLp3Ywfzs9xlRyga7XEoCaTvSeaOMoIV48J/uPQDC
LH7E6dREpDoFW9/1Jz0HGSd3A4YBZDCCkwd5yKBiuw1iDMge/7dekpwndhpN3Lah
F9Xk15r4lrYANwXr6Lm8V5dnhPi2lu7UUuNi981gKczoRyTvMC8CtWxJ/G8R0c2c
hnqzHoz3E+9QVhi04u9w7Rxk+6dJJfXwq80IVXXNiqAqsYkjqPu33LS6N//6r3hK
fov6Hfdia4MHUi+B9e9FvinPYNXK3U9PYnGQU5SVRkinHh8iE5BDLaS8CEIqFUV2
1KSYnCxBXSE=
=erQ7
-----END PGP SIGNATURE-----



Reply to: