]> git.pld-linux.org Git - packages/kernel.git/blame - 2.6.0-t5-memleak-ixj_pcmcia-lkml.patch
- _rel 1.19,
[packages/kernel.git] / 2.6.0-t5-memleak-ixj_pcmcia-lkml.patch
CommitLineData
d912b53b 1From MAILER-DAEMON Tue Sep 23 08:37:46 2003
2Date: 23 Sep 2003 08:37:46 +0000
3From: Mail System Internal Data <MAILER-DAEMON@alpha.zarz.agh.edu.pl>
4Subject: DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA
5X-IMAP: 1064306266 0000000000
6Status: RO
7
8This text is part of the internal format of your mail folder, and is not
9a real message. It is created automatically by the mail system software.
10If deleted, important folder data will be lost, and it will be re-created
11with the data reset to initial values.
12
13From cieciwa@alpha.zarz.agh.edu.pl Tue Sep 23 00:49:30 2003 +0000
14Status: R
15X-Status:
16X-Keywords:
17Return-Path: <linux-kernel-owner+cieciwa=40alpha.zarz.agh.edu.pl@vger.kernel.org>
18X-Original-To: cieciwa@alpha.zarz.agh.edu.pl
19Delivered-To: cieciwa@alpha.zarz.agh.edu.pl
20Received: from galaxy.uci.agh.edu.pl (galaxy.uci.agh.edu.pl [149.156.96.9])
21 by alpha.zarz.agh.edu.pl (Postfix) with ESMTP id 0CB8E241A5
22 for <cieciwa@alpha.zarz.agh.edu.pl>; Tue, 23 Sep 2003 00:49:30 +0000 (UTC)
23Received: from vger.kernel.org (vger.kernel.org [67.72.78.212])
24 by galaxy.uci.agh.edu.pl (Postfix) with ESMTP id 06210AF49E
25 for <cieciwa@alpha.zarz.agh.edu.pl>; Tue, 23 Sep 2003 01:01:55 +0200 (CEST)
26Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
27 id S261863AbTIVW6J (ORCPT <rfc822;cieciwa@alpha.zarz.agh.edu.pl>);
28 Mon, 22 Sep 2003 18:58:09 -0400
29Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261164AbTIVW4Z
30 (ORCPT <rfc822;linux-kernel-outgoing>);
31 Mon, 22 Sep 2003 18:56:25 -0400
32Received: from fw.osdl.org ([65.172.181.6]:13794 "EHLO mail.osdl.org")
33 by vger.kernel.org with ESMTP id S261768AbTIVW4G (ORCPT
34 <rfc822;linux-kernel@vger.kernel.org>);
35 Mon, 22 Sep 2003 18:56:06 -0400
36Received: (from chrisw@localhost)
37 by mail.osdl.org (8.11.6/8.11.6) id h8MMtfd13257;
38 Mon, 22 Sep 2003 15:55:41 -0700
39Date: Mon, 22 Sep 2003 15:55:41 -0700
40From: Chris Wright <chrisw@osdl.org>
41To: David Yu Chen <dychen@stanford.edu>
42Cc: linux-kernel@vger.kernel.org, mc@cs.stanford.edu,
43 torvalds@osdl.org, akpm@osdl.org
44Subject: Re: [CHECKER] 32 Memory Leaks on Error Paths
45Message-ID: <20030922155541.G18606@osdlab.pdx.osdl.net>
46References: <200309160435.h8G4ZkQM009953@elaine4.Stanford.EDU>
47Mime-Version: 1.0
48Content-Type: text/plain; charset=us-ascii
49Content-Disposition: inline
50User-Agent: Mutt/1.2.5i
51In-Reply-To: <200309160435.h8G4ZkQM009953@elaine4.Stanford.EDU>; from dychen@stanford.edu on Mon, Sep 15, 2003 at 09:35:46PM -0700
52Sender: linux-kernel-owner@vger.kernel.org
53Precedence: bulk
54X-Mailing-List: linux-kernel@vger.kernel.org
55
56* David Yu Chen (dychen@stanford.edu) wrote:
57> [FILE: 2.6.0-test5/drivers/telephony/ixj_pcmcia.c]
58> [FUNC: ixj_attach]
59> [LINES: 53-64]
60> [VAR: link]
61> 48: client_reg_t client_reg;
62> 49: dev_link_t *link;
63> 50: int ret;
64> 51: DEBUG(0, "ixj_attach()\n");
65> 52: /* Create new ixj device */
66> START -->
67> 53: link = kmalloc(sizeof(struct dev_link_t), GFP_KERNEL);
68> 54: if (!link)
69> 55: return NULL;
70> 56: memset(link, 0, sizeof(struct dev_link_t));
71> 57: link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
72> 58: link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
73> 59: link->io.IOAddrLines = 3;
74> 60: link->conf.Vcc = 50;
75> 61: link->conf.IntType = INT_MEMORY_AND_IO;
76> 62: link->priv = kmalloc(sizeof(struct ixj_info_t), GFP_KERNEL);
77> 63: if (!link->priv)
78> END -->
79> 64: return NULL;
80
81Yes, this is a bug. Patch below.
82
83thanks,
84-chris
85
86===== drivers/telephony/ixj_pcmcia.c 1.6 vs edited =====
87--- 1.6/drivers/telephony/ixj_pcmcia.c Sat Aug 16 13:22:52 2003
88+++ edited/drivers/telephony/ixj_pcmcia.c Mon Sep 22 15:38:40 2003
89@@ -60,8 +60,10 @@
90 link->conf.Vcc = 50;
91 link->conf.IntType = INT_MEMORY_AND_IO;
92 link->priv = kmalloc(sizeof(struct ixj_info_t), GFP_KERNEL);
93- if (!link->priv)
94+ if (!link->priv) {
95+ kfree(link);
96 return NULL;
97+ }
98 memset(link->priv, 0, sizeof(struct ixj_info_t));
99 /* Register with Card Services */
100 link->next = dev_list;
101-
102To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
103the body of a message to majordomo@vger.kernel.org
104More majordomo info at http://vger.kernel.org/majordomo-info.html
105Please read the FAQ at http://www.tux.org/lkml/
106
This page took 0.083729 seconds and 4 git commands to generate.