Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1513612

Re: [PATCH] kobject: set state_initialized to 0 in kobject_cleanup

From "Wu, Songjun" <Songjun.Wu@microchip.com>
Newsgroups linux.kernel
Subject Re: [PATCH] kobject: set state_initialized to 0 in kobject_cleanup
Date 2016-11-02 02:40 +0100
Message-ID <sySH0-80X-1@gated-at.bofh.it> (permalink)
References <syENH-7yd-5@gated-at.bofh.it> <syIHE-1Ai-11@gated-at.bofh.it>
Organization Microchip

Show all headers | View raw



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
>

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] kobject: set state_initialized to 0 in kobject_cleanup Songjun Wu <songjun.wu@microchip.com> - 2016-11-01 11:50 +0100
  Re: [PATCH] kobject: set state_initialized to 0 in kobject_cleanup Greg KH <gregkh@linuxfoundation.org> - 2016-11-01 16:00 +0100
    Re: [PATCH] kobject: set state_initialized to 0 in kobject_cleanup "Wu, Songjun" <Songjun.Wu@microchip.com> - 2016-11-02 02:40 +0100

csiph-web