[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

concerns about sysfs_ops


Dear Mochel,
	I found you removed off/count params in new sysfs_ops functions. That's
good change for show functions, but for store function, if you don't
give the len of data, the chained xxx_store function has to assume
or/and guess how long the data is. This might be a potential issue. So I
suggest you add 'size_t count' in store function of sysfs_ops.

include/linux/sysfs.h:  1.21 1.22 louis 03/01/13 18:39:41 (modified, 
needs delta)

@@ -18,7 +18,7 @@
 
 struct sysfs_ops {
 	ssize_t	(*show)(struct kobject *, struct attribute *,char *);
-	ssize_t	(*store)(struct kobject *,struct attribute *,const char *);
+	ssize_t	(*store)(struct kobject *,struct attribute *,const char *,
size_t count);
 };
 
 extern int


Yours truly,
Louis Zhuang
---------------
Fault Injection Test Harness Project
BK tree: http://fault-injection.bkbits.net/linux-2.5
Home Page: http://sf.net/projects/fault-injection

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


この情報があなたの探していたものかどうか選択してください。
yes/まさにこれだ!   no/違うなぁ   part/一部見つかった   try/これで試してみる

あなたが探していた情報はどのようなことか、ご自由に記入下さい。特に「まさにこれだ!」と言う場合は記入をお願いします。
例:「複数のマシンからCATV経由でipmasqueradeを利用してWebを参照したい場合の設定について」
Follow-Ups: