07 May, 2021

1 commit

  • The section "19) Editor modelines and other cruft" in
    Documentation/process/coding-style.rst clearly says, "Do not include any
    of these in source files."

    I recently receive a patch to explicitly add a new one.

    Let's do treewide cleanups, otherwise some people follow the existing code
    and attempt to upstream their favoriate editor setups.

    It is even nicer if scripts/checkpatch.pl can check it.

    If we like to impose coding style in an editor-independent manner, I think
    editorconfig (patch [1]) is a saner solution.

    [1] https://lore.kernel.org/lkml/20200703073143.423557-1-danny@kdrag0n.dev/

    Link: https://lkml.kernel.org/r/20210324054457.1477489-1-masahiroy@kernel.org
    Signed-off-by: Masahiro Yamada
    Acked-by: Geert Uytterhoeven
    Reviewed-by: Miguel Ojeda [auxdisplay]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Masahiro Yamada
     

05 May, 2020

1 commit

  • - Add a SPDX header;
    - Adjust document and section titles;
    - Use copyright symbol;
    - Some whitespace fixes and new line breaks;
    - Mark literal blocks as such;
    - Add it to filesystems/index.rst.

    Also, as this file is alone on its own dir, and it doesn't
    seem too likely that other documents will follow it, let's
    move it to the filesystems/ root documentation dir.

    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/c2424ec2ad4d735751434ff7f52144c44aa02d5a.1588021877.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details you
    should have received a copy of the gnu general public license along
    with this program if not write to the free software foundation inc
    59 temple place suite 330 boston ma 021110 1307 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 84 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Richard Fontana
    Reviewed-by: Allison Randal
    Reviewed-by: Kate Stewart
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190524100844.756442981@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

19 Jun, 2018

1 commit


19 Oct, 2017

1 commit

  • The ci_type field of the config_item structure do not modify the fields
    of the config_item_type structure it points to. And the other pointers
    initialized with ci_type do not modify the fields as well.
    So, make the ci_type field and the pointers initialized with ci_type
    as const.

    Make the struct config_item_type *type function argument of functions
    config_{item/group}_init_type_name const as the argument in both the
    functions is only stored in the ci_type field of a config_item structure
    which is now made const.
    Make the argument of configfs_register_default_group const as it is
    only passed to the argument of the function config_group_init_type_name
    which is now const.

    Signed-off-by: Bhumika Goyal
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Christoph Hellwig

    Bhumika Goyal
     

12 Jun, 2017

1 commit


06 Mar, 2016

1 commit

  • Replace the current NULL-terminated array of default groups with a linked
    list. This gets rid of lots of nasty code to size and/or dynamically
    allocate the array.

    While we're at it also provide a conveniant helper to remove the default
    groups.

    Signed-off-by: Christoph Hellwig
    Acked-by: Felipe Balbi [drivers/usb/gadget]
    Acked-by: Joel Becker
    Acked-by: Nicholas Bellinger
    Reviewed-by: Sagi Grimberg

    Christoph Hellwig
     

18 Jul, 2015

1 commit

  • Some modules call config_item_init_type_name() and config_group_init_type_name()
    with parameter "name" directly controlled by userspace. These two
    functions call config_item_set_name() with this name used as a format
    string, which can be used to leak information such as content of the
    stack to userspace.

    For example, make_netconsole_target() in netconsole module calls
    config_item_init_type_name() with the name of a newly-created directory.
    This means that the following commands give some unexpected output, with
    configfs mounted in /sys/kernel/config/ and on a system with a
    configured eth0 ethernet interface:

    # modprobe netconsole
    # mkdir /sys/kernel/config/netconsole/target_%lx
    # echo eth0 > /sys/kernel/config/netconsole/target_%lx/dev_name
    # echo 1 > /sys/kernel/config/netconsole/target_%lx/enabled
    # echo eth0 > /sys/kernel/config/netconsole/target_%lx/dev_name
    # dmesg |tail -n1
    [ 142.697668] netconsole: target (target_ffffffffc0ae8080) is
    enabled, disable to update parameters

    The directory name is correct but %lx has been interpreted in the
    internal item name, displayed here in the error message used by
    store_dev_name() in drivers/net/netconsole.c.

    To fix this, update every caller of config_item_set_name to use "%s"
    when operating on untrusted input.

    This issue was found using -Wformat-security gcc flag, once a __printf
    attribute has been added to config_item_set_name().

    Signed-off-by: Nicolas Iooss
    Acked-by: Greg Kroah-Hartman
    Acked-by: Felipe Balbi
    Acked-by: Joel Becker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nicolas Iooss
     

25 Jun, 2015

1 commit


05 Jun, 2014

1 commit


28 Sep, 2011

1 commit

  • There are numerous broken references to Documentation files (in other
    Documentation files, in comments, etc.). These broken references are
    caused by typo's in the references, and by renames or removals of the
    Documentation files. Some broken references are simply odd.

    Fix these broken references, sometimes by dropping the irrelevant text
    they were part of.

    Signed-off-by: Paul Bolle
    Signed-off-by: Jiri Kosina

    Paul Bolle
     

11 Jul, 2007

2 commits

  • Configfs being based upon sysfs code, config_group_find_obj() is probably
    so named because of the similar kset_find_obj() in sysfs. However,
    "kobject"s in sysfs become "config_item"s in configfs, so let's call it
    config_group_find_item() instead, for sake of uniformity, and make
    corresponding change in the users of this function.

    BTW a crucial difference between kset_find_obj and config_group_find_item
    is in locking expectations. kset_find_obj does its locking by itself, but
    config_group_find_item expects the *caller* to do the locking. The reason
    for this: kset's have their own locks, config_group's don't but instead
    rely on the subsystem mutex. And, subsystem needn't necessarily be around
    when config_group_find_item() is called.

    So let's state these locking semantics explicitly, and rectify the comment,
    otherwise bugs could continue to occur in future, as they did in the past
    (refer commit d82b8191e238 in gfs2-2.6-fixes.git).

    [ I also took the opportunity to fix some bad whitespace and
    double-empty lines. --Joel ]

    [ Conflict in fs/dlm/config.c with commit
    3168b0780d06ace875696f8a648d04d6089654e5 manually resolved. --Mark ]

    Signed-off-by: Satyam Sharma
    Cc: David Teigland
    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Satyam Sharma
     
  • 1. item.c:config_item_cleanup() is a private function (only called by
    config_item_release() in same file). However, it is spuriously
    exported in include/linux/configfs.h, so remove that export and make
    it static in item.c. Also, it is no longer exported / interface
    function, so no need to give comment for this function (the comment
    was stating obvious thing, anyway).

    2. Kernel-doc comment format does not allow empty line between end of
    comment and start of function (declaration line). There were several
    such spurious empty lines in item.c, so fix them.

    fs/configfs/item.c | 15 +++------------
    include/linux/configfs.h | 1 -
    2 files changed, 3 insertions(+), 13 deletions(-)

    Signed-off-by: Satyam Sharma
    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Satyam Sharma
     

18 Jan, 2006

1 commit


04 Jan, 2006

1 commit