04 Jul, 2013
1 commit
-
The difference between "count" and "len" is that "len" is capped at
4095. Changing it like this makes it match how sysfs_write_file() is
implemented.This is a static analysis patch. I haven't found any store_attribute()
functions where this change makes a difference.Signed-off-by: Dan Carpenter
Acked-by: Joel Becker
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
30 Apr, 2008
1 commit
-
__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: Harvey Harrison
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
26 Jan, 2008
1 commit
-
configfs_register_subsystem() with default_groups triggers recursive locking.
it seems that mutex_lock_nested is needed.=============================================
[ INFO: possible recursive locking detected ]
2.6.24-rc6 #145
---------------------------------------------
swapper/1 is trying to acquire lock:
(&sb->s_type->i_mutex_key#3){--..}, at: [] configfs_add_file+0x2e/0x70but task is already holding lock:
(&sb->s_type->i_mutex_key#3){--..}, at: [] configfs_register_subsystem+0x55/0x130other info that might help us debug this:
1 lock held by swapper/1:
#0: (&sb->s_type->i_mutex_key#3){--..}, at: [] configfs_register_subsystem+0x55/0x130stack backtrace:
Pid: 1, comm: swapper Not tainted 2.6.24-rc6 #145
[] show_trace_log_lvl+0x1a/0x30
[] show_trace+0x12/0x20
[] dump_stack+0x6e/0x80
[] __lock_acquire+0xe62/0x1120
[] lock_acquire+0x82/0xa0
[] mutex_lock_nested+0x98/0x2e0
[] configfs_add_file+0x2e/0x70
[] configfs_create_file+0x2c/0x40
[] configfs_attach_item+0x139/0x220
[] configfs_attach_group+0x14/0x140
[] configfs_attach_group+0xc9/0x140
[] configfs_register_subsystem+0xc6/0x130
[] init_netconsole+0x2b6/0x300
[] kernel_init+0x142/0x320
[] kernel_thread_helper+0x7/0x14
=======================Signed-off-by: Joonwoo Park
Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh
11 Jul, 2007
2 commits
-
Seems copied from sysfs, but I don't see a reason here nor there to use
a semaphore instead of a mutex. Convert.Signed-off-by: Johannes Berg
Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh -
The attribute store/show code currently limits attributes at PAGE_SIZE.
This code comes from sysfs, where it still works that way.However, PAGE_SIZE is not constant. A 16k attribute string works on
ia64 but not on x86. Really a subsystem shouldn't allow different
attribute sizes based on platform.As such, limit all simple attributes to 4k. This works on all
platforms, and is consistent with all current code.Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh
10 May, 2007
1 commit
-
Cleanup using simple_read_from_buffer() in binfmt_misc, configfs, and sysfs.
Cc: Greg Kroah-Hartman
Cc: Joel Becker
Signed-off-by: Akinobu Mita
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
08 Feb, 2007
1 commit
-
Attributes in configfs are text files. As such, most handlers expect to be
able to call functions like simple_strtoul() without checking the bounds
of the buffer. Change the call to zero terminate the buffer before calling
the client's ->store() method. This does reduce the attribute size from
PAGE_SIZE to PAGE_SIZE-1.Also, change get_zeroed_page() to alloc_page(), as we are handling the
termination.Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh
09 Dec, 2006
1 commit
-
Change all the uses of f_{dentry,vfsmnt} to f_path.{dentry,mnt} in the
configfs filesystem.Signed-off-by: Josef "Jeff" Sipek
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
21 Oct, 2006
1 commit
-
check_perm() does not drop the reference to the module when kzalloc()
failure occurs.Signed-Off-By: Chandra Seetharaman
Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh
03 Oct, 2006
1 commit
-
configfs: use size_t length modifier in pr_debug format argument
Signed-off-by: Zach Brown
Acked-by: Joel Becker
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
27 Sep, 2006
1 commit
-
Conversions from kmalloc+memset to kzalloc.
Signed-off-by: Panagiotis Issaris
Jffs2-bit-acked-by: David Woodhouse
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
29 Mar, 2006
1 commit
-
This is a conversion to make the various file_operations structs in fs/
const. Basically a regexp job, with a few manual fixupsThe goal is both to increase correctness (harder to accidentally write to
shared datastructures) and reducing the false sharing of cachelines with
things that get dirty in .data (while .rodata is nicely read only and thus
cache clean)Signed-off-by: Arjan van de Ven
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
04 Feb, 2006
1 commit
-
configfs always made item and attribute ownership root.root and
permissions based on a umask of 022. Add ->setattr() to allow
chown(2)/chmod(2), and persist the changes for the lifetime of the
items and attributes.Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh
10 Jan, 2006
1 commit
-
This patch converts the inode semaphore to a mutex. I have tested it on
XFS and compiled as much as one can consider on an ia64. Anyway your
luck with it might be different.Modified-by: Ingo Molnar
(finished the conversion)
Signed-off-by: Jes Sorensen
Signed-off-by: Ingo Molnar
04 Jan, 2006
1 commit
-
Configfs, a file system for userspace-driven kernel object configuration.
The OCFS2 stack makes extensive use of this for propagation of cluster
configuration information into kernel.Signed-off-by: Joel Becker