mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Wu, Songjun" <Songjun.Wu@microchip.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kobject: set state_initialized to 0 in kobject_cleanup
Date: Wed, 2 Nov 2016 09:29:06 +0800	[thread overview]
Message-ID: <9b6ce344-a8a8-6a51-7577-51a89005c065@microchip.com> (raw)
In-Reply-To: <20161101145638.GA1474@kroah.com>



On 11/1/2016 22:56, Greg KH wrote:
> On Tue, Nov 01, 2016 at 06:41:44PM +0800, Songjun Wu wrote:
>> If state_initialized is not set to 0 when a kobject is
>> released, a device is registered, unregistered, and
>> registered again, the error below will occur.
>>
>> kobject (dec04bb0): tried to init an initialized object,
>> something is seriously wrong.
>
> Yes, your code is wrong, don't try to change the kernel core to work
> around it :)
>
> That message is there for a reason, and this patch has been rejected
> many times in the past.  kobjects can NOT ever be reused, and should
> never be static (but yes, there are lots of in-kernel users with static
> kobjects, they just never get reused...)
>
> What code is emitting this message?  I'll be glad to help you fix it up
> if you can point me at it.
>
Thank you very much.
I will not use the static kobjects to fix the error.
:)
> thanks,
>
> greg k-h
>

      reply	other threads:[~2016-11-02  1:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-01 10:41 Songjun Wu
2016-11-01 14:56 ` Greg KH
2016-11-02  1:29   ` Wu, Songjun [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=9b6ce344-a8a8-6a51-7577-51a89005c065@microchip.com \
    --to=songjun.wu@microchip.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®