public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Artem B. Bityutskiy" <dedekind@yandex.ru>
To: Greg KH <greg@kroah.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [Bug? Report] kref problem
Date: Thu, 16 Mar 2006 20:45:10 +0300	[thread overview]
Message-ID: <4419A426.9080908@yandex.ru> (raw)
In-Reply-To: <20060316165323.GA10197@kroah.com>


Greg KH wrote:
> Don't statically create kobjects, it's not nice.  But the real problem
> is below...

Well, that was just an example...

But in real life I do use a static kobject in one case, so I'm very 
interested what should I do instead. I have a subsystem, and I want it 
to put all its stuff in a /sys/A directory. So I just define a static 
kobject for A and assign a dummy release function to it. Why is this bad?

And what should I do instead? kmalloc(sizeof(struct kobject), 
GFP_KERNEL) ? I do not have a dynamic structure corresponding to my 
module. I have many data structures corresponding to entities my object 
handles and I have one static array which refers them. All is simple. I 
do not want to introduce a dynamic data structure corresponding to the 
subsystem as a whole just in order to not use static kobjects.

Comments?

-- 
Best Regards,
Artem B. Bityutskiy,
St.-Petersburg, Russia.

  parent reply	other threads:[~2006-03-16 17:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-16 11:41 [Bug? Report] kref problem Artem B. Bityutskiy
2006-03-16 16:47 ` Greg KH
2006-03-16 16:50   ` Greg KH
2006-03-16 16:50   ` Artem B. Bityutskiy
2006-03-16 16:53 ` Greg KH
2006-03-16 17:07   ` Artem B. Bityutskiy
2006-03-16 17:10     ` Artem B. Bityutskiy
2006-03-16 17:20       ` Greg KH
2006-03-16 18:00         ` Artem B. Bityutskiy
2006-03-16 18:10           ` Greg KH
2006-03-16 17:18     ` Greg KH
2006-03-16 17:31   ` Dave Hansen
2006-03-16 17:42     ` Greg KH
2006-03-16 17:45   ` Artem B. Bityutskiy [this message]
2006-03-16 17:58     ` Greg KH
2006-03-16 18:08       ` Artem B. Bityutskiy
2006-03-16 18:20         ` Greg KH
2006-03-17  9:30           ` Artem B. Bityutskiy
2006-03-17 15:18             ` Greg KH
2006-03-17 16:34               ` Artem B. Bityutskiy

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=4419A426.9080908@yandex.ru \
    --to=dedekind@yandex.ru \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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