15 Dec, 2014

1 commit

  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    Linus Torvalds
     

27 Nov, 2014

1 commit

  • This patch adds a helper function that simplifies adding a
    so-called single_open sequence file for device drivers. The
    calling device driver needs to provide a read function and
    a device pointer. The field struct seq_file::private will
    reference the device pointer upon call to the read function
    so the driver can obtain his data from it and do its task
    of providing the file content using seq_printf() calls and
    alike. Using this helper function also gets rid of the need
    to specify file operations per debugfs file.

    Signed-off-by: Arend van Spriel
    Signed-off-by: Greg Kroah-Hartman

    Arend van Spriel
     

20 Nov, 2014

1 commit

  • …git/rostedt/linux-trace into for-next

    Pull the beginning of seq_file cleanup from Steven:
    "I'm looking to clean up the seq_file code and to eventually merge the
    trace_seq code with seq_file as well, since they basically do the same thing.

    Part of this process is to remove the return code of seq_printf() and friends
    as they are rather inconsistent. It is better to use the new function
    seq_has_overflowed() if you want to stop processing when the buffer
    is full. Note, if the buffer is full, the seq_file code will throw away
    the contents, allocate a bigger buffer, and then call your code again
    to fill in the data. The only thing that breaking out of the function
    early does is to save a little time which is probably never noticed.

    I started with patches from Joe Perches and modified them as well.
    There's many more places that need to be updated before we can convert
    seq_printf() and friends to return void. But this patch set introduces
    the seq_has_overflowed() and does some initial updates."

    Al Viro
     

06 Nov, 2014

1 commit

  • The seq_printf() will soon just return void, and seq_has_overflowed()
    should be used instead to see if the seq can no longer accept input.

    As the return value of debugfs_print_regs32() has no users and
    the seq_file descriptor should be checked with seq_has_overflowed()
    instead of return values of functions, it is better to just have
    debugfs_print_regs32() also return void.

    Link: http://lkml.kernel.org/p/2634b19eb1c04a9d31148c1fe6f1f3819be95349.1412031505.git.joe@perches.com

    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Joe Perches
    [ original change only updated seq_printf() return, added return of
    void to debugfs_print_regs32() as well ]
    Signed-off-by: Steven Rostedt

    Joe Perches
     

04 Nov, 2014

1 commit


10 Jul, 2014

2 commits

  • fixes checkpatch.pl trailing whitespace errors

    Signed-off-by: Rahul Bedarkar
    Signed-off-by: Greg Kroah-Hartman

    Rahul Bedarkar
     
  • [ I'm currently running my tests on it now, and so far, after a few
    hours it has yet to blow up. I'll run it for 24 hours which it never
    succeeded in the past. ]

    The tracing code has a way to make directories within the debugfs file
    system as well as deleting them using mkdir/rmdir in the instance
    directory. This is very limited in functionality, such as there is
    no renames, and the parent directory "instance" can not be modified.
    The tracing code creates the instance directory from the debugfs code
    and then replaces the dentry->d_inode->i_op with its own to allow
    for mkdir/rmdir to work.

    When these are called, the d_entry and inode locks need to be released
    to call the instance creation and deletion code. That code has its own
    accounting and locking to serialize everything to prevent multiple
    users from causing harm. As the parent "instance" directory can not
    be modified this simplifies things.

    I created a stress test that creates several threads that randomly
    creates and deletes directories thousands of times a second. The code
    stood up to this test and I submitted it a while ago.

    Recently I added a new test that adds readers to the mix. While the
    instance directories were being added and deleted, readers would read
    from these directories and even enable tracing within them. This test
    was able to trigger a bug:

    general protection fault: 0000 [#1] PREEMPT SMP
    Modules linked in: ...
    CPU: 3 PID: 17789 Comm: rmdir Tainted: G W 3.15.0-rc2-test+ #41
    Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./To be filled by O.E.M., BIOS SDBLI944.86P 05/08/2007
    task: ffff88003786ca60 ti: ffff880077018000 task.ti: ffff880077018000
    RIP: 0010:[] [] debugfs_remove_recursive+0x1bd/0x367
    RSP: 0018:ffff880077019df8 EFLAGS: 00010246
    RAX: 0000000000000002 RBX: ffff88006f0fe490 RCX: 0000000000000000
    RDX: dead000000100058 RSI: 0000000000000246 RDI: ffff88003786d454
    RBP: ffff88006f0fe640 R08: 0000000000000628 R09: 0000000000000000
    R10: 0000000000000628 R11: ffff8800795110a0 R12: ffff88006f0fe640
    R13: ffff88006f0fe640 R14: ffffffff81817d0b R15: ffffffff818188b7
    FS: 00007ff13ae24700(0000) GS:ffff88007d580000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: 0000003054ec7be0 CR3: 0000000076d51000 CR4: 00000000000007e0
    Stack:
    ffff88007a41ebe0 dead000000100058 00000000fffffffe ffff88006f0fe640
    0000000000000000 ffff88006f0fe678 ffff88007a41ebe0 ffff88003793a000
    00000000fffffffe ffffffff810bde82 ffff88006f0fe640 ffff88007a41eb28
    Call Trace:
    [] ? instance_rmdir+0x15b/0x1de
    [] ? vfs_rmdir+0x80/0xd3
    [] ? do_rmdir+0xd1/0x139
    [] ? trace_hardirqs_on_thunk+0x3a/0x3c
    [] ? system_call_fastpath+0x16/0x1b
    Code: fe ff ff 48 8d 75 30 48 89 df e8 c9 fd ff ff 85 c0 75 13 48 c7 c6 b8 cc d2 81 48 c7 c7 b0 cc d2 81 e8 8c 7a f5 ff 48 8b 54 24 08 8b 82 a8 00 00 00 48 89 d3 48 2d a8 00 00 00 48 89 44 24 08
    RIP [] debugfs_remove_recursive+0x1bd/0x367
    RSP

    It took a while, but every time it triggered, it was always in the
    same place:

    list_for_each_entry_safe(child, next, &parent->d_subdirs, d_u.d_child) {

    Where the child->d_u.d_child seemed to be corrupted. I added lots of
    trace_printk()s to see what was wrong, and sure enough, it was always
    the child's d_u.d_child field. I looked around to see what touches
    it and noticed that in __dentry_kill() which calls dentry_free():

    static void dentry_free(struct dentry *dentry)
    {
    /* if dentry was never visible to RCU, immediate free is OK */
    if (!(dentry->d_flags & DCACHE_RCUACCESS))
    __d_free(&dentry->d_u.d_rcu);
    else
    call_rcu(&dentry->d_u.d_rcu, __d_free);
    }

    I also noticed that __dentry_kill() unlinks the child->d_u.child
    under the parent->d_lock spin_lock.

    Looking back at the loop in debugfs_remove_recursive() it never takes the
    parent->d_lock to do the list walk. Adding more tracing, I was able to
    prove this was the issue:

    ftrace-t-15385 1.... 246662024us : dentry_kill : free ffff88006d573600
    rmdir-15409 2.... 246662024us : debugfs_remove_recursive : child=ffff88006d573600 next=dead000000100058

    The dentry_kill freed ffff88006d573600 just as the remove recursive was walking
    it.

    In order to fix this, the list walk needs to be modified a bit to take
    the parent->d_lock. The safe version is no longer necessary, as every
    time we remove a child, the parent->d_lock must be released and the
    list walk must start over. Each time a child is removed, even though it
    may still be on the list, it should be skipped by the first check
    in the loop:

    if (!debugfs_positive(child))
    continue;

    Cc: stable@vger.kernel.org
    Signed-off-by: Steven Rostedt
    Signed-off-by: Greg Kroah-Hartman

    Steven Rostedt
     

05 Apr, 2014

1 commit

  • Pull ext4 updates from Ted Ts'o:
    "Major changes for 3.14 include support for the newly added ZERO_RANGE
    and COLLAPSE_RANGE fallocate operations, and scalability improvements
    in the jbd2 layer and in xattr handling when the extended attributes
    spill over into an external block.

    Other than that, the usual clean ups and minor bug fixes"

    * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (42 commits)
    ext4: fix premature freeing of partial clusters split across leaf blocks
    ext4: remove unneeded test of ret variable
    ext4: fix comment typo
    ext4: make ext4_block_zero_page_range static
    ext4: atomically set inode->i_flags in ext4_set_inode_flags()
    ext4: optimize Hurd tests when reading/writing inodes
    ext4: kill i_version support for Hurd-castrated file systems
    ext4: each filesystem creates and uses its own mb_cache
    fs/mbcache.c: doucple the locking of local from global data
    fs/mbcache.c: change block and index hash chain to hlist_bl_node
    ext4: Introduce FALLOC_FL_ZERO_RANGE flag for fallocate
    ext4: refactor ext4_fallocate code
    ext4: Update inode i_size after the preallocation
    ext4: fix partial cluster handling for bigalloc file systems
    ext4: delete path dealloc code in ext4_ext_handle_uninitialized_extents
    ext4: only call sync_filesystm() when remounting read-only
    fs: push sync_filesystem() down to the file system's remount_fs()
    jbd2: improve error messages for inconsistent journal heads
    jbd2: minimize region locked by j_list_lock in jbd2_journal_forget()
    jbd2: minimize region locked by j_list_lock in journal_get_create_access()
    ...

    Linus Torvalds
     

13 Mar, 2014

1 commit

  • Previously, the no-op "mount -o mount /dev/xxx" operation when the
    file system is already mounted read-write causes an implied,
    unconditional syncfs(). This seems pretty stupid, and it's certainly
    documented or guaraunteed to do this, nor is it particularly useful,
    except in the case where the file system was mounted rw and is getting
    remounted read-only.

    However, it's possible that there might be some file systems that are
    actually depending on this behavior. In most file systems, it's
    probably fine to only call sync_filesystem() when transitioning from
    read-write to read-only, and there are some file systems where this is
    not needed at all (for example, for a pseudo-filesystem or something
    like romfs).

    Signed-off-by: "Theodore Ts'o"
    Cc: linux-fsdevel@vger.kernel.org
    Cc: Christoph Hellwig
    Cc: Artem Bityutskiy
    Cc: Adrian Hunter
    Cc: Evgeniy Dushistov
    Cc: Jan Kara
    Cc: OGAWA Hirofumi
    Cc: Anders Larsen
    Cc: Phillip Lougher
    Cc: Kees Cook
    Cc: Mikulas Patocka
    Cc: Petr Vandrovec
    Cc: xfs@oss.sgi.com
    Cc: linux-btrfs@vger.kernel.org
    Cc: linux-cifs@vger.kernel.org
    Cc: samba-technical@lists.samba.org
    Cc: codalist@coda.cs.cmu.edu
    Cc: linux-ext4@vger.kernel.org
    Cc: linux-f2fs-devel@lists.sourceforge.net
    Cc: fuse-devel@lists.sourceforge.net
    Cc: cluster-devel@redhat.com
    Cc: linux-mtd@lists.infradead.org
    Cc: jfs-discussion@lists.sourceforge.net
    Cc: linux-nfs@vger.kernel.org
    Cc: linux-nilfs@vger.kernel.org
    Cc: linux-ntfs-dev@lists.sourceforge.net
    Cc: ocfs2-devel@oss.oracle.com
    Cc: reiserfs-devel@vger.kernel.org

    Theodore Ts'o
     

19 Feb, 2014

1 commit


13 Nov, 2013

1 commit


01 Aug, 2013

1 commit

  • debugfs_remove_recursive() is wrong,

    1. it wrongly assumes that !list_empty(d_subdirs) means that this
    dir should be removed.

    This is not that bad by itself, but:

    2. if d_subdirs does not becomes empty after __debugfs_remove()
    it gives up and silently fails, it doesn't even try to remove
    other entries.

    However ->d_subdirs can be non-empty because it still has the
    already deleted !debugfs_positive() entries.

    3. simple_release_fs() is called even if __debugfs_remove() fails.

    Suppose we have

    dir1/
    dir2/
    file2
    file1

    and someone opens dir1/dir2/file2.

    Now, debugfs_remove_recursive(dir1/dir2) succeeds, and dir1/dir2 goes
    away.

    But debugfs_remove_recursive(dir1) silently fails and doesn't remove
    this directory. Because it tries to delete (the already deleted)
    dir1/dir2/file2 again and then fails due to "Avoid infinite loop"
    logic.

    Test-case:

    #!/bin/sh

    cd /sys/kernel/debug/tracing
    echo 'p:probe/sigprocmask sigprocmask' >> kprobe_events
    sleep 1000 < events/probe/sigprocmask/id &
    echo -n >| kprobe_events

    [ -d events/probe ] && echo "ERR!! failed to rm probe"

    And after that it is not possible to create another probe entry.

    With this patch debugfs_remove_recursive() skips !debugfs_positive()
    files although this is not strictly needed. The most important change
    is that it does not try to make ->d_subdirs empty, it simply scans
    the whole list(s) recursively and removes as much as possible.

    Link: http://lkml.kernel.org/r/20130726151256.GC19472@redhat.com

    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Oleg Nesterov
    Signed-off-by: Steven Rostedt

    Oleg Nesterov
     

04 Jun, 2013

2 commits

  • In case, userland writes an empty string to a bool debugfs file, buf[]
    will still be uninitialized when being passed to strtobool() making the
    outcome of that function purely random.

    Fix this by always zero-terminating the buffer.

    Signed-off-by: Mathias Krause
    Signed-off-by: Greg Kroah-Hartman

    Mathias Krause
     
  • debugfs currently lack the ability to create attributes
    that set/get atomic_t values.

    This patch adds support for this through a new
    debugfs_create_atomic_t() function.

    Signed-off-by: Seth Jennings
    Acked-by: Greg Kroah-Hartman
    Acked-by: Mel Gorman
    Acked-by: Rik van Riel
    Acked-by: Konrad Rzeszutek Wilk
    Signed-off-by: Greg Kroah-Hartman

    Seth Jennings
     

04 Mar, 2013

1 commit

  • Modify the request_module to prefix the file system type with "fs-"
    and add aliases to all of the filesystems that can be built as modules
    to match.

    A common practice is to build all of the kernel code and leave code
    that is not commonly needed as modules, with the result that many
    users are exposed to any bug anywhere in the kernel.

    Looking for filesystems with a fs- prefix limits the pool of possible
    modules that can be loaded by mount to just filesystems trivially
    making things safer with no real cost.

    Using aliases means user space can control the policy of which
    filesystem modules are auto-loaded by editing /etc/modprobe.d/*.conf
    with blacklist and alias directives. Allowing simple, safe,
    well understood work-arounds to known problematic software.

    This also addresses a rare but unfortunate problem where the filesystem
    name is not the same as it's module name and module auto-loading
    would not work. While writing this patch I saw a handful of such
    cases. The most significant being autofs that lives in the module
    autofs4.

    This is relevant to user namespaces because we can reach the request
    module in get_fs_type() without having any special permissions, and
    people get uncomfortable when a user specified string (in this case
    the filesystem type) goes all of the way to request_module.

    After having looked at this issue I don't think there is any
    particular reason to perform any filtering or permission checks beyond
    making it clear in the module request that we want a filesystem
    module. The common pattern in the kernel is to call request_module()
    without regards to the users permissions. In general all a filesystem
    module does once loaded is call register_filesystem() and go to sleep.
    Which means there is not much attack surface exposed by loading a
    filesytem module unless the filesystem is mounted. In a user
    namespace filesystems are not mounted unless .fs_flags = FS_USERNS_MOUNT,
    which most filesystems do not set today.

    Acked-by: Serge Hallyn
    Acked-by: Kees Cook
    Reported-by: Kees Cook
    Signed-off-by: "Eric W. Biederman"

    Eric W. Biederman
     

18 Jan, 2013

2 commits


11 Jan, 2013

1 commit


16 Nov, 2012

1 commit


03 Oct, 2012

1 commit

  • Pull user namespace changes from Eric Biederman:
    "This is a mostly modest set of changes to enable basic user namespace
    support. This allows the code to code to compile with user namespaces
    enabled and removes the assumption there is only the initial user
    namespace. Everything is converted except for the most complex of the
    filesystems: autofs4, 9p, afs, ceph, cifs, coda, fuse, gfs2, ncpfs,
    nfs, ocfs2 and xfs as those patches need a bit more review.

    The strategy is to push kuid_t and kgid_t values are far down into
    subsystems and filesystems as reasonable. Leaving the make_kuid and
    from_kuid operations to happen at the edge of userspace, as the values
    come off the disk, and as the values come in from the network.
    Letting compile type incompatible compile errors (present when user
    namespaces are enabled) guide me to find the issues.

    The most tricky areas have been the places where we had an implicit
    union of uid and gid values and were storing them in an unsigned int.
    Those places were converted into explicit unions. I made certain to
    handle those places with simple trivial patches.

    Out of that work I discovered we have generic interfaces for storing
    quota by projid. I had never heard of the project identifiers before.
    Adding full user namespace support for project identifiers accounts
    for most of the code size growth in my git tree.

    Ultimately there will be work to relax privlige checks from
    "capable(FOO)" to "ns_capable(user_ns, FOO)" where it is safe allowing
    root in a user names to do those things that today we only forbid to
    non-root users because it will confuse suid root applications.

    While I was pushing kuid_t and kgid_t changes deep into the audit code
    I made a few other cleanups. I capitalized on the fact we process
    netlink messages in the context of the message sender. I removed
    usage of NETLINK_CRED, and started directly using current->tty.

    Some of these patches have also made it into maintainer trees, with no
    problems from identical code from different trees showing up in
    linux-next.

    After reading through all of this code I feel like I might be able to
    win a game of kernel trivial pursuit."

    Fix up some fairly trivial conflicts in netfilter uid/git logging code.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: (107 commits)
    userns: Convert the ufs filesystem to use kuid/kgid where appropriate
    userns: Convert the udf filesystem to use kuid/kgid where appropriate
    userns: Convert ubifs to use kuid/kgid
    userns: Convert squashfs to use kuid/kgid where appropriate
    userns: Convert reiserfs to use kuid and kgid where appropriate
    userns: Convert jfs to use kuid/kgid where appropriate
    userns: Convert jffs2 to use kuid and kgid where appropriate
    userns: Convert hpfs to use kuid and kgid where appropriate
    userns: Convert btrfs to use kuid/kgid where appropriate
    userns: Convert bfs to use kuid/kgid where appropriate
    userns: Convert affs to use kuid/kgid wherwe appropriate
    userns: On alpha modify linux_to_osf_stat to use convert from kuids and kgids
    userns: On ia64 deal with current_uid and current_gid being kuid and kgid
    userns: On ppc convert current_uid from a kuid before printing.
    userns: Convert s390 getting uid and gid system calls to use kuid and kgid
    userns: Convert s390 hypfs to use kuid and kgid where appropriate
    userns: Convert binder ipc to use kuids
    userns: Teach security_path_chown to take kuids and kgids
    userns: Add user namespace support to IMA
    userns: Convert EVM to deal with kuids and kgids in it's hmac computation
    ...

    Linus Torvalds
     

02 Oct, 2012

1 commit

  • Pull driver core merge from Greg Kroah-Hartman:
    "Here is the big driver core update for 3.7-rc1.

    A number of firmware_class.c updates (as you saw a month or so ago),
    and some hyper-v updates and some printk fixes as well. All patches
    that are outside of the drivers/base area have been acked by the
    respective maintainers, and have all been in the linux-next tree for a
    while.

    Signed-off-by: Greg Kroah-Hartman "

    * tag 'driver-core-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (95 commits)
    memory: tegra{20,30}-mc: Fix reading incorrect register in mc_readl()
    device.h: Add missing inline to #ifndef CONFIG_PRINTK dev_vprintk_emit
    memory: emif: Add ifdef CONFIG_DEBUG_FS guard for emif_debugfs_[init|exit]
    Documentation: Fixes some translation error in Documentation/zh_CN/gpio.txt
    Documentation: Remove 3 byte redundant code at the head of the Documentation/zh_CN/arm/booting
    Documentation: Chinese translation of Documentation/video4linux/omap3isp.txt
    device and dynamic_debug: Use dev_vprintk_emit and dev_printk_emit
    dev: Add dev_vprintk_emit and dev_printk_emit
    netdev_printk/netif_printk: Remove a superfluous logging colon
    netdev_printk/dynamic_netdev_dbg: Directly call printk_emit
    dev_dbg/dynamic_debug: Update to use printk_emit, optimize stack
    driver-core: Shut up dev_dbg_reatelimited() without DEBUG
    tools/hv: Parse /etc/os-release
    tools/hv: Check for read/write errors
    tools/hv: Fix exit() error code
    tools/hv: Fix file handle leak
    Tools: hv: Implement the KVP verb - KVP_OP_GET_IP_INFO
    Tools: hv: Rename the function kvp_get_ip_address()
    Tools: hv: Implement the KVP verb - KVP_OP_SET_IP_INFO
    Tools: hv: Add an example script to configure an interface
    ...

    Linus Torvalds
     

22 Sep, 2012

2 commits

  • The format_array_alloc() function is fundamentally racy, in that it
    prints the array twice: once to figure out how much space to allocate
    for the buffer, and the second time to actually print out the data.

    If any of the array contents changes in between, the allocation size may
    be wrong, and the end result may be truncated in odd ways.

    Just don't do it. Allocate a maximum-sized array up-front, and just
    format the array contents once. The only user of the u32_array
    interfaces is the Xen spinlock statistics code, and it has 31 entries in
    the arrays, so the maximum size really isn't that big, and the end
    result is much simpler code without the bug.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • u32_array_open() is racy when multiple threads read from a file with a
    seek position of zero, i.e. when two or more simultaneous reads are
    occurring after the non-seekable files are created. It is possible that
    file->private_data is double-freed because the threads races between

    kfree(file->private-data);

    and

    file->private_data = NULL;

    The fix is to only do format_array_alloc() when the file is opened and
    free it when it is closed.

    Note that because the file has always been non-seekable, you can't open
    it and read it multiple times anyway, so the data has always been
    generated just once. The difference is that now it is generated at open
    time rather than at the time of the first read, and that avoids the
    race.

    Reported-by: Dave Jones
    Acked-by: Konrad Rzeszutek Wilk
    Tested-by: Raghavendra
    Signed-off-by: David Rientjes
    Signed-off-by: Linus Torvalds

    David Rientjes
     

07 Sep, 2012

1 commit


28 Aug, 2012

1 commit


17 Aug, 2012

1 commit


27 Jul, 2012

1 commit

  • Pull driver core changes from Greg Kroah-Hartman:
    "Here's the big driver core pull request for 3.6-rc1.

    Unlike 3.5, this kernel should be a lot tamer, with the printk changes
    now settled down. All we have here is some extcon driver updates, w1
    driver updates, a few printk cleanups that weren't needed for 3.5, but
    are good to have now, and some other minor fixes/changes in the driver
    core.

    All of these have been in the linux-next releases for a while now.

    Signed-off-by: Greg Kroah-Hartman "

    * tag 'driver-core-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (38 commits)
    printk: Export struct log size and member offsets through vmcoreinfo
    Drivers: hv: Change the hex constant to a decimal constant
    driver core: don't trigger uevent after failure
    extcon: MAX77693: Add extcon-max77693 driver to support Maxim MAX77693 MUIC device
    sysfs: fail dentry revalidation after namespace change fix
    sysfs: fail dentry revalidation after namespace change
    extcon: spelling of detach in function doc
    extcon: arizona: Stop microphone detection if we give up on it
    extcon: arizona: Update cable reporting calls and split headset
    PM / Runtime: Do not increment device usage counts before probing
    kmsg - do not flush partial lines when the console is busy
    kmsg - export "continuation record" flag to /dev/kmsg
    kmsg - avoid warning for CONFIG_PRINTK=n compilations
    kmsg - properly print over-long continuation lines
    driver-core: Use kobj_to_dev instead of re-implementing it
    driver-core: Move kobj_to_dev from genhd.h to device.h
    driver core: Move deferred devices to the end of dpm_list before probing
    driver core: move uevent call to driver_register
    driver core: fix shutdown races with probe/remove(v3)
    Extcon: Arizona: Add driver for Wolfson Arizona class devices
    ...

    Linus Torvalds
     

14 Jul, 2012

3 commits


14 Jun, 2012

1 commit


17 Apr, 2012

1 commit


06 Apr, 2012

1 commit

  • Many users of debugfs copy the implementation of default_open() when
    they want to support a custom read/write function op. This leads to a
    proliferation of the default_open() implementation across the entire
    tree.

    Now that the common implementation has been consolidated into libfs we
    can replace all the users of this function with simple_open().

    This replacement was done with the following semantic patch:

    @ open @
    identifier open_f != simple_open;
    identifier i, f;
    @@
    -int open_f(struct inode *i, struct file *f)
    -{
    (
    -if (i->i_private)
    -f->private_data = i->i_private;
    |
    -f->private_data = i->i_private;
    )
    -return 0;
    -}

    @ has_open depends on open @
    identifier fops;
    identifier open.open_f;
    @@
    struct file_operations fops = {
    ...
    -.open = open_f,
    +.open = simple_open,
    ...
    };

    [akpm@linux-foundation.org: checkpatch fixes]
    Signed-off-by: Stephen Boyd
    Cc: Greg Kroah-Hartman
    Cc: Al Viro
    Cc: Julia Lawall
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     

22 Mar, 2012

1 commit

  • Pull vfs pile 1 from Al Viro:
    "This is _not_ all; in particular, Miklos' and Jan's stuff is not there
    yet."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (64 commits)
    ext4: initialization of ext4_li_mtx needs to be done earlier
    debugfs-related mode_t whack-a-mole
    hfsplus: add an ioctl to bless files
    hfsplus: change finder_info to u32
    hfsplus: initialise userflags
    qnx4: new helper - try_extent()
    qnx4: get rid of qnx4_bread/qnx4_getblk
    take removal of PF_FORKNOEXEC to flush_old_exec()
    trim includes in inode.c
    um: uml_dup_mmap() relies on ->mmap_sem being held, but activate_mm() doesn't hold it
    um: embed ->stub_pages[] into mmu_context
    gadgetfs: list_for_each_safe() misuse
    ocfs2: fix leaks on failure exits in module_init
    ecryptfs: make register_filesystem() the last potential failure exit
    ntfs: forgets to unregister sysctls on register_filesystem() failure
    logfs: missing cleanup on register_filesystem() failure
    jfs: mising cleanup on register_filesystem() failure
    make configfs_pin_fs() return root dentry on success
    configfs: configfs_create_dir() has parent dentry in dentry->d_parent
    configfs: sanitize configfs_create()
    ...

    Linus Torvalds
     

21 Mar, 2012

1 commit


03 Feb, 2012

1 commit


27 Jan, 2012

1 commit

  • Cautious admins may want to restrict access to debugfs. Currently a
    manual chown/chmod e.g. in an init script is needed to achieve that.
    Distributions that want to make the mount options configurable need
    to add extra config files. By allowing to set the root inode's uid,
    gid and mode via mount options no such hacks are needed anymore.
    Instead configuration becomes straight forward via fstab.

    Signed-off-by: Ludwig Nussel
    Signed-off-by: Greg Kroah-Hartman

    Ludwig Nussel
     

24 Jan, 2012

1 commit

  • Fix new kernel-doc warnings:

    Warning(fs/debugfs/file.c:556): No description found for parameter 'nregs'
    Warning(fs/debugfs/file.c:556): Excess function parameter 'mregs' description in 'debugfs_print_regs32'

    Signed-off-by: Randy Dunlap
    Cc: Greg Kroah-Hartman
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

09 Jan, 2012

1 commit

  • * 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (165 commits)
    reiserfs: Properly display mount options in /proc/mounts
    vfs: prevent remount read-only if pending removes
    vfs: count unlinked inodes
    vfs: protect remounting superblock read-only
    vfs: keep list of mounts for each superblock
    vfs: switch ->show_options() to struct dentry *
    vfs: switch ->show_path() to struct dentry *
    vfs: switch ->show_devname() to struct dentry *
    vfs: switch ->show_stats to struct dentry *
    switch security_path_chmod() to struct path *
    vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb
    vfs: trim includes a bit
    switch mnt_namespace ->root to struct mount
    vfs: take /proc/*/mounts and friends to fs/proc_namespace.c
    vfs: opencode mntget() mnt_set_mountpoint()
    vfs: spread struct mount - remaining argument of next_mnt()
    vfs: move fsnotify junk to struct mount
    vfs: move mnt_devname
    vfs: move mnt_list to struct mount
    vfs: switch pnode.h macros to struct mount *
    ...

    Linus Torvalds
     

04 Jan, 2012

1 commit