Netdev List
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen@asianux.com>
To: Tilman Schmidt <tilman@imap.cc>
Cc: isdn@linux-pingi.de, Jiri Slaby <jslaby@suse.cz>,
	Jiri Kosina <jkosina@suse.cz>, David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>
Subject: Re: [Suggestion] drivers/isdn/divert: break looping, or memory leak by calling kmalloc again
Date: Mon, 01 Apr 2013 18:19:56 +0800	[thread overview]
Message-ID: <51595F4C.3040107@asianux.com> (raw)
In-Reply-To: <51595C9A.1060608@imap.cc>

On 2013年04月01日 18:08, Tilman Schmidt wrote:
> Am 01.04.2013 04:11, schrieb Chen Gang:
>> > in drivers/isdn/divert/isdn_divert.c:
>> > 
>> >   in 'for' looping (line 395..515)
>> >     the 'cs' may call kmalloc again (line 453).
>> > 
>> >   it seems need break looping, when get valid 'cs' value (line 509)
> I don't think so. If the kmalloc for cs succeeds, control flow will
> continue linearly up to the 'if' statement in line 503. Then it will
> either kfree(cs) and return, or reach the 'break' in line 514 which
> will end the 'for' loop.

  oh, really it is, it is my fault !
    (I did not see the break at line 514)

  thanks.

  :-)



-- 
Chen Gang

Asianux Corporation

      reply	other threads:[~2013-04-01 10:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-01  2:11 [Suggestion] drivers/isdn/divert: break looping, or memory leak by calling kmalloc again Chen Gang
2013-04-01 10:08 ` Tilman Schmidt
2013-04-01 10:19   ` Chen Gang [this message]

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=51595F4C.3040107@asianux.com \
    --to=gang.chen@asianux.com \
    --cc=davem@davemloft.net \
    --cc=isdn@linux-pingi.de \
    --cc=jkosina@suse.cz \
    --cc=jslaby@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=tilman@imap.cc \
    /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