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

    Dan Carpenter
     

30 Apr, 2008

1 commit


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/0x70

    but task is already holding lock:
    (&sb->s_type->i_mutex_key#3){--..}, at: [] configfs_register_subsystem+0x55/0x130

    other 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/0x130

    stack 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

    Joonwoo Park
     

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

    Johannes Berg
     
  • 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

    Joel Becker
     

10 May, 2007

1 commit


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

    Joel Becker
     

09 Dec, 2006

1 commit


21 Oct, 2006

1 commit


03 Oct, 2006

1 commit


27 Sep, 2006

1 commit


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 fixups

    The 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

    Arjan van de Ven
     

04 Feb, 2006

1 commit


10 Jan, 2006

1 commit


04 Jan, 2006

1 commit