lkml.org 
[lkml]   [2006]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Bug? Report] kref problem
On Thu, Mar 16, 2006 at 02:41:19PM +0300, Artem B. Bityutskiy wrote:
> Hello Greg,
>
> I've hit on a kref problem Please, glance at the attached test module.
>
> The idea of the test is to create 2 kobjects (a and b), create dir A
> with kobject A, and dir B with kobject B, so that A is B's parent. E.g.,
> we'll have /sys/A/B.
>
> I see the following output of the test:
>
> a inited, kref 1
> b inited, kref 1
> dir A created, A kref 1, B kref 1
> dir B created, A kref 1, B kref 1
> b_release
> a_release
> kobj B put, A kref 0, B kref 0
> kobj A put, A kref -1, B kref 0
>
>
> So what I don't like is this "A kref -1". Why when I remove directory B,
> kobj a is released? For me it looks like a bug.

Sample code please?

Also, creating sysfs directories does not change the reference count on
kobjects, they are two separate things.

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-16 17:49    [W:0.291 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site