All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen@asianux.com>
To: Tejun Heo <tj@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kernel/workqueue.c: kfree issue, need check flag 'WQ_UNBOUND' when processing failure.
Date: Wed, 15 May 2013 09:34:36 +0800	[thread overview]
Message-ID: <5192E62C.5090107@asianux.com> (raw)
In-Reply-To: <20130514152046.GC6795@mtj.dyndns.org>

On 05/14/2013 11:20 PM, Tejun Heo wrote:
> On Tue, May 14, 2013 at 09:06:40PM +0800, Chen Gang wrote:
>>  err_destroy:
>>  	destroy_workqueue(wq);
>> +	if (flags & WQ_UNBOUND) {
>> +err_free_wq:
>> +		free_workqueue_attrs(wq->unbound_attrs);
>> +		kfree(wq);
>> +	}
> 
> Doesn't the above make the code free wq twice on after err_destroy?
> 

Oh, it is my fault. I did not see the put_pwq_unlocked() in details,
next I should read the code carefully.


Thanks.
-- 
Chen Gang

Asianux Corporation

  reply	other threads:[~2013-05-15  1:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-14 13:06 [PATCH] kernel/workqueue.c: kfree issue, need check flag 'WQ_UNBOUND' when processing failure Chen Gang
2013-05-14 15:20 ` Tejun Heo
2013-05-15  1:34   ` Chen Gang [this message]
2013-05-15 21:11     ` Tejun Heo
2013-05-16  2:04       ` Chen Gang

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=5192E62C.5090107@asianux.com \
    --to=gang.chen@asianux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.