]>
Commit | Line | Data |
---|---|---|
d912b53b | 1 | From MAILER-DAEMON Tue Sep 23 08:37:46 2003 |
2 | Date: 23 Sep 2003 08:37:46 +0000 | |
3 | From: Mail System Internal Data <MAILER-DAEMON@alpha.zarz.agh.edu.pl> | |
4 | Subject: DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA | |
5 | X-IMAP: 1064306266 0000000000 | |
6 | Status: RO | |
7 | ||
8 | This text is part of the internal format of your mail folder, and is not | |
9 | a real message. It is created automatically by the mail system software. | |
10 | If deleted, important folder data will be lost, and it will be re-created | |
11 | with the data reset to initial values. | |
12 | ||
13 | From cieciwa@alpha.zarz.agh.edu.pl Tue Sep 23 00:49:30 2003 +0000 | |
14 | Status: R | |
15 | X-Status: | |
16 | X-Keywords: | |
17 | Return-Path: <linux-kernel-owner+cieciwa=40alpha.zarz.agh.edu.pl@vger.kernel.org> | |
18 | X-Original-To: cieciwa@alpha.zarz.agh.edu.pl | |
19 | Delivered-To: cieciwa@alpha.zarz.agh.edu.pl | |
20 | Received: 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) | |
23 | Received: 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) | |
26 | Received: (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 | |
29 | Received: (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 | |
32 | Received: 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 | |
36 | Received: (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 | |
39 | Date: Mon, 22 Sep 2003 15:55:41 -0700 | |
40 | From: Chris Wright <chrisw@osdl.org> | |
41 | To: David Yu Chen <dychen@stanford.edu> | |
42 | Cc: linux-kernel@vger.kernel.org, mc@cs.stanford.edu, | |
43 | torvalds@osdl.org, akpm@osdl.org | |
44 | Subject: Re: [CHECKER] 32 Memory Leaks on Error Paths | |
45 | Message-ID: <20030922155541.G18606@osdlab.pdx.osdl.net> | |
46 | References: <200309160435.h8G4ZkQM009953@elaine4.Stanford.EDU> | |
47 | Mime-Version: 1.0 | |
48 | Content-Type: text/plain; charset=us-ascii | |
49 | Content-Disposition: inline | |
50 | User-Agent: Mutt/1.2.5i | |
51 | In-Reply-To: <200309160435.h8G4ZkQM009953@elaine4.Stanford.EDU>; from dychen@stanford.edu on Mon, Sep 15, 2003 at 09:35:46PM -0700 | |
52 | Sender: linux-kernel-owner@vger.kernel.org | |
53 | Precedence: bulk | |
54 | X-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 | ||
81 | Yes, this is a bug. Patch below. | |
82 | ||
83 | thanks, | |
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 | - | |
102 | To unsubscribe from this list: send the line "unsubscribe linux-kernel" in | |
103 | the body of a message to majordomo@vger.kernel.org | |
104 | More majordomo info at http://vger.kernel.org/majordomo-info.html | |
105 | Please read the FAQ at http://www.tux.org/lkml/ | |
106 |