[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200703081405.01087.oneukum@suse.de>
Date: Thu, 8 Mar 2007 14:05:00 +0100
From: Oliver Neukum <oneukum@...e.de>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Maneesh Soni <maneesh@...ibm.com>, gregkh@...e.de,
Alan Stern <stern@...land.harvard.edu>,
linux-kernel@...r.kernel.org
Subject: refcounting drivers' data structures used in sysfs buffers
Hi,
after a lightning bolt from high above I've been looking into refcounting
the data structures drivers use to provide the data used to refill sysfs
buffers. I've come to the following conclusion.
1. struct sysfs_buffer must have a struct kref * and probably a destructor
pointer
2. drivers must be able to pass these pointers through an extended
device_create_file()
3. Drivers must use refcounting if they want to use attributes
4. read/write/poll must do refcounting
I am not sure where to store the pointers. struct sysfs_dirent() looks
like the obvious choice. Comments?
Regards
Oliver
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists