Thread (13 messages) 13 messages, 3 authors, 2004-02-07

Re: fbdev sysfs support.

flat view

From: Greg KH <hidden>
Date: 2004-02-07 01:19:38
Also in: lkml

On Sat, Feb 07, 2004 at 01:10:48AM +0000, viro@parcelfarce.linux.theplanet.co.uk wrote:
On Sat, Feb 07, 2004 at 01:01:35AM +0000, James Simmons wrote:
quoted
+static void release_fb_info(struct class_device *class_dev)
+{
+	struct fb_info *info = to_fb_info(class_dev);
+
+	/* This doesn't harm */
+	fb_dealloc_cmap(&info->cmap);
+
+	kfree(info);
+}
So what has happens when we hit existing kfree() on fb_info while sysfs
node is busy?
This function will not get called until the sysfs node stops being busy,
so it should all work properly.  But only if that fb_info structure was
allocated dynamically, unlike all of the current fb drivers (see my
other comment about this patch.)

So in that case, this will cause us to try to call kfree on a static
structure :(

thanks,

greg k-h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help