19 Oct, 2007

40 commits

  • The non-filesystem capability meaning of CAP_SETPCAP is that a process, p1,
    can change the capabilities of another process, p2. This is not the
    meaning that was intended for this capability at all, and this
    implementation came about purely because, without filesystem capabilities,
    there was no way to use capabilities without one process bestowing them on
    another.

    Since we now have a filesystem support for capabilities we can fix the
    implementation of CAP_SETPCAP.

    The most significant thing about this change is that, with it in effect, no
    process can set the capabilities of another process.

    The capabilities of a program are set via the capability convolution
    rules:

    pI(post-exec) = pI(pre-exec)
    pP(post-exec) = (X(aka cap_bset) & fP) | (pI(post-exec) & fI)
    pE(post-exec) = fE ? pP(post-exec) : 0

    at exec() time. As such, the only influence the pre-exec() program can
    have on the post-exec() program's capabilities are through the pI
    capability set.

    The correct implementation for CAP_SETPCAP (and that enabled by this patch)
    is that it can be used to add extra pI capabilities to the current process
    - to be picked up by subsequent exec()s when the above convolution rules
    are applied.

    Here is how it works:

    Let's say we have a process, p. It has capability sets, pE, pP and pI.
    Generally, p, can change the value of its own pI to pI' where

    (pI' & ~pI) & ~pP = 0.

    That is, the only new things in pI' that were not present in pI need to
    be present in pP.

    The role of CAP_SETPCAP is basically to permit changes to pI beyond
    the above:

    if (pE & CAP_SETPCAP) {
    pI' = anything; /* ie., even (pI' & ~pI) & ~pP != 0 */
    }

    This capability is useful for things like login, which (say, via
    pam_cap) might want to raise certain inheritable capabilities for use
    by the children of the logged-in user's shell, but those capabilities
    are not useful to or needed by the login program itself.

    One such use might be to limit who can run ping. You set the
    capabilities of the 'ping' program to be "= cap_net_raw+i", and then
    only shells that have (pI & CAP_NET_RAW) will be able to run
    it. Without CAP_SETPCAP implemented as described above, login(pam_cap)
    would have to also have (pP & CAP_NET_RAW) in order to raise this
    capability and pass it on through the inheritable set.

    Signed-off-by: Andrew Morgan
    Signed-off-by: Serge E. Hallyn
    Cc: Stephen Smalley
    Cc: James Morris
    Cc: Casey Schaufler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morgan
     
  • After adding checking to register_sysctl_table and finding a whole new set
    of bugs. Missed by countless code reviews and testers I have finally lost
    patience with the binary sysctl interface.

    The binary sysctl interface has been sort of deprecated for years and
    finding a user space program that uses the syscall is more difficult then
    finding a needle in a haystack. Problems continue to crop up, with the in
    kernel implementation. So since supporting something that no one uses is
    silly, deprecate sys_sysctl with a sufficient grace period and notice that
    the handful of user space applications that care can be fixed or replaced.

    The /proc/sys sysctl interface that people use will continue to be
    supported indefinitely.

    This patch moves the tested warning about sysctls from the path where
    sys_sysctl to a separate path called from both implementations of
    sys_sysctl, and it adds a proper entry into
    Documentation/feature-removal-schedule.

    Allowing us to revisit this in a couple years time and actually kill
    sys_sysctl.

    [lethal@linux-sh.org: sysctl: Fix syscall disabled build]
    Signed-off-by: Eric W. Biederman
    Signed-off-by: Paul Mundt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • It turns out that the net/irda code didn't register any of it's binary paths
    in the global sysctl.h header file so I missed them completely when making an
    authoritative list of binary sysctl paths in the kernel. So add them to the
    list of valid binary sysctl paths.

    Signed-off-by: Eric W. Biederman
    Acked-by: Samuel Ortiz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • Well it turns out after I dug into the problems a little more I was returning
    a few false positives so this patch updates my logic to remove them.

    - Don't complain about 0 ctl_names in sysctl_check_binary_path
    It is valid for someone to remove the sysctl binary interface
    and still keep the same sysctl proc interface.

    - Count ctl_names and procnames as matching if they both don't
    exist.

    - Only warn about missing min&max when the generic functions care.

    Signed-off-by: Eric W. Biederman
    Cc: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • After going through the kernels sysctl tables several times it has become
    clear that code review and testing is just not effective in prevent
    problematic sysctl tables from being used in the stable kernel. I certainly
    can't seem to fix the problems as fast as they are introduced.

    Therefore this patch adds sysctl_check_table which is called when a sysctl
    table is registered and checks to see if we have a problematic sysctl table.

    The biggest part of the code is the table of valid binary sysctl entries, but
    since we have frozen our set of binary sysctls this table should not need to
    change, and it makes it much easier to detect when someone unintentionally
    adds a new binary sysctl value.

    As best as I can determine all of the several hundred errors spewed on boot up
    now are legitimate.

    [bunk@kernel.org: kernel/sysctl_check.c must #include ]
    Signed-off-by: Eric W. Biederman
    Cc: Alexey Dobriyan
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • Grumble. These numbers should have been in sysctl.h from the beginning if we
    ever expected anyone to use them. Oh well put them there now so we can find
    them and make maintenance easier.

    Signed-off-by: Eric W. Biederman
    Acked-by: Samuel Ortiz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • It looks like we inadvertently killed the cad_pid binary sysctl support when
    cap_pid was changed to be a struct pid. Since no one has complained just
    remove the binary path.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • No one has bothered to set strategy routine for the the netfilter sysctls that
    return jiffies to be sysctl_jiffies.

    So it appears the sys_sysctl path is unused and untested, so this patch
    removes the binary sysctl numbers.

    Which fixes the netfilter oops in 2.6.23-rc2-mm2 for me.

    Signed-off-by: Eric W. Biederman
    Cc: Patrick McHardy
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • Instead of having a bunch of ifdefs in sysctl.c move all of the pty sysctl
    logic into drivers/char/pty.c

    As well as cleaning up the logic this prevents sysctl_check_table from
    complaining that the root table has a NULL data pointer on something with
    generic methods.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • The sysctl binary paths don't look as if they even code work, .data is not
    filled in, and all of the proc_handlers look at extra1 and there is not
    strategy routine.

    So just kill the binary paths.

    In addition this patch removes the setting of extra1 on directories. It
    doesn't look like the parport code ever examines it, and it's bad sysctl form.

    [bunk@kernel.org: remove parport_device_num()]
    Signed-off-by: Eric W. Biederman
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • aio-nr, aio-max-nr, acpi_video_flags are unsigned long values which sysctl
    does not handle properly with a 64bit kernel and a 32bit user space.

    Since no one is likely to be using the binary sysctl values and the ascii
    interface still works, this patch just removes support for the binary sysctl
    interface from the kernel.

    Signed-off-by: Eric W. Biederman
    Cc: Alexey Dobriyan
    Cc: Benjamin LaHaise
    Cc: Zach Brown
    Cc: Badari Pulavarty
    Cc: Len Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • Currently tcp_available_congestion_control does not even attempt being read
    from sys_sysctl, and ipfrag_max_dist while it works allows setting of invalid
    values using sys_sysctl.

    So just kill the binary sys_sysctl support for these sysctls. If the support
    is not important enough to test and get right it probably isn't important
    enough to keep.

    Signed-off-by: Eric W. Biederman
    Cc: Alexey Dobriyan
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • The binary interface for the cdrom sysctls can't possilby work. So remove the
    binary sysctls and update the test for finding out which sysctl table entry we
    are dealy with to use the procname and not the ctl_name (which I am removing).

    Signed-off-by: Eric W. Biederman
    Cc: Alexey Dobriyan
    Cc: Jens Axboe
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • Signed-off-by: Eric W. Biederman
    Cc: Alexey Dobriyan
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • This is debug code so no need to support binary sysctl, and the binary sysctls
    as they were written were not consistent with what showed up in /proc so
    remove the binary sysctl support.

    Signed-off-by: Eric W. Biederman
    Cc: Alexey Dobriyan
    Cc: "David S. Miller"
    Cc: Trond Myklebust
    Cc: Neil Brown
    Cc: "J. Bruce Fields"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • We don't preoperly support the sysctl binary path for flushing the ipv6
    routes. So remove support for a binary path.

    Signed-off-by: Eric W. Biederman
    Cc: Alexey Dobriyan
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • - In ipv6 ndisc_ifinfo_syctl_change so it doesn't depend on binary
    sysctl names for a function that works with proc.

    - In neighbour.c reorder the table to put the possibly unused entries
    at the end so we can remove them by terminating the table early.

    - In neighbour.c kill the entries with questionable binary sysctl
    handling behavior.

    - In neighbour.c if we don't have a strategy routine remove the
    binary path. So we don't the default sysctl strategy routine
    on data that is not ready for it.

    Signed-off-by: Eric W. Biederman
    Cc: Alexey Dobriyan
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • These functions are all wrapper functions for the proc interface that are
    needed for them to work correctly.

    Signed-off-by: Eric W. Biederman
    Cc: Alexey Dobriyan
    Acked-by: Andrew Morgan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • Because of a conflict with FS_INODE_NR none of the binary sysctl numbers use
    by mqueue, were available to user space. So just remove them.

    Signed-off-by: Eric W. Biederman
    Cc: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • There as been no easy way to wrap the default sysctl strategy routine except
    for returning 0. Which is not always what we want. The few instances I have
    seen that want different behaviour have written their own version of
    sysctl_data. While not too hard it is unnecessary code and has the potential
    for extra bugs.

    So to make these situations easier and make that part of sysctl more symetric
    I have factord sysctl_data out of do_sysctl_strategy and exported as a
    function everyone can use.

    Further having sysctl_data be an explicit function makes checking for badly
    formed sysctl tables much easier.

    Signed-off-by: Eric W. Biederman
    Cc: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • In sysctl.h the typedef struct ctl_table ctl_table violates coding style isn't
    needed and is a bit of a nuisance because it makes it harder to recognize
    ctl_table is a type name.

    So this patch removes it from the generic sysctl code. Hopefully I will have
    enough energy to send the rest of my patches will follow and to remove it from
    the rest of the kernel.

    Signed-off-by: Eric W. Biederman
    Cc: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • If the ATTR_KILL_S*ID bits are set then any mode change is only for clearing
    the setuid/setgid bits. For CIFS, skip the mode change and let the server
    handle it.

    Signed-off-by: Jeff Layton
    Cc: Steven French
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Layton
     
  • If the ATTR_KILL_S*ID bits are set then any mode change is only for clearing
    the setuid/setgid bits. For NFS, skip the mode change and let the server
    handle it.

    Signed-off-by: Jeff Layton
    Cc: Trond Myklebust
    Cc: "J. Bruce Fields"
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Layton
     
  • When an unprivileged process attempts to modify a file that has the setuid or
    setgid bits set, the VFS will attempt to clear these bits. The VFS will set
    the ATTR_KILL_SUID or ATTR_KILL_SGID bits in the ia_valid mask, and then call
    notify_change to clear these bits and set the mode accordingly.

    With a networked filesystem (NFS and CIFS in particular but likely others),
    the client machine or process may not have credentials that allow for setting
    the mode. In some situations, this can lead to file corruption, an operation
    failing outright because the setattr fails, or to races that lead to a mode
    change being reverted.

    In this situation, we'd like to just leave the handling of this to the server
    and ignore these bits. The problem is that by the time the setattr op is
    called, the VFS has already reinterpreted the ATTR_KILL_* bits into a mode
    change. The setattr operation has no way to know its intent.

    The following patch fixes this by making notify_change no longer clear the
    ATTR_KILL_SUID and ATTR_KILL_SGID bits in the ia_valid before handing it off
    to the setattr inode op. setattr can then check for the presence of these
    bits, and if they're set it can assume that the mode change was only for the
    purposes of clearing these bits.

    This means that we now have an implicit assumption that notify_change is never
    called with ATTR_MODE and either ATTR_KILL_S*ID bit set. Nothing currently
    enforces that, so this patch also adds a BUG() if that occurs.

    Signed-off-by: Jeff Layton
    Cc: Michael Halcrow
    Cc: Christoph Hellwig
    Cc: Neil Brown
    Cc: "J. Bruce Fields"
    Cc: Chris Mason
    Cc: Jeff Mahoney
    Cc: "Vladimir V. Saveliev"
    Cc: Josef 'Jeff' Sipek
    Cc: Trond Myklebust
    Cc: Steven French
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Layton
     
  • reiserfs_setattr can call notify_change recursively using the same
    iattr struct. This could cause it to trip the BUG() in notify_change.
    Fix reiserfs to clear those bits near the beginning of the function.

    Signed-off-by: Jeff Layton
    Cc: Chris Mason
    Cc: Jeff Mahoney
    Cc: "Vladimir V. Saveliev"
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Layton
     
  • It's theoretically possible for a single SETATTR call to come in that sets the
    mode and the uid/gid. In that case, don't set the ATTR_KILL_S*ID bits since
    that would trip the BUG() in notify_change. Just fix up the mode to have the
    same effect.

    Signed-off-by: Jeff Layton
    Cc: Neil Brown
    Cc: "J. Bruce Fields"
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Layton
     
  • Make sure ecryptfs doesn't trip the BUG() in notify_change. This also allows
    the lower filesystem to interpret ATTR_KILL_S*ID in its own way.

    Signed-off-by: Jeff Layton
    Cc: Michael Halcrow
    Cc: Christoph Hellwig
    Cc: Neil Brown
    Cc: "J. Bruce Fields"
    Cc: Chris Mason
    Cc: Jeff Mahoney
    Cc: "Vladimir V. Saveliev"
    Cc: Josef 'Jeff' Sipek
    Cc: Trond Myklebust
    Cc: Steven French
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Layton
     
  • - Fix resource leakage in error case within detect_cache_attributes()

    - Don't register hotcpu notifier when cache_add_dev() returns error

    - Introduce cache_dev_map cpumask to track whether cache interface for
    CPU is successfully added by cache_add_dev() or not.

    cache_add_dev() may fail with out of memory error. In order to
    avoid cache_remove_dev() with that uninitialized cache interface when
    CPU_DEAD event is delivered we need to have the cache_dev_map cpumask.

    (We cannot change cache_add_dev() from CPU_ONLINE event handler
    to CPU_UP_PREPARE event handler. Because cache_add_dev() needs
    to do cpuid and store the results with its CPU online.)

    [nix.or.die@googlemail.com: fix a section mismatch warning]
    Cc: Ashok Raj
    Signed-off-by: Akinobu Mita
    Cc: Gautham R Shenoy
    Cc: Oleg Nesterov
    Cc: Andi Kleen
    Cc: Jan Beulich
    Signed-off-by: Gabriel Craciunescu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • - Clear kobject in percpu device_mce before calling sysdev_register() with

    Because mce_create_device() may fail and it leaves kobject filled with
    junk. It will be the problem when mce_create_device() will be called
    next time.

    - Fix error handling in mce_create_device()

    Error handling should not do sysdev_remove_file() with not yet added
    attributes.

    - Don't register hotcpu notifier when mce_create_device() returns error

    - Do mce_create_device() in CPU_UP_PREPARE instead of CPU_ONLINE

    Cc: Andi Kleen
    Signed-off-by: Akinobu Mita
    Cc: Gautham R Shenoy
    Cc: Oleg Nesterov
    Cc: Andi Kleen
    Cc: Jan Beulich
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • Do msr_device_create() in CPU_UP_PREPARE instead of CPU_ONLINE.

    Cc: "H. Peter Anvin"
    Signed-off-by: Akinobu Mita
    Cc: Gautham R Shenoy
    Cc: Oleg Nesterov
    Cc: Andi Kleen
    Cc: Jan Beulich
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • Do thermal_throttle_add_dev() in CPU_UP_PREPARE instead of CPU_ONLINE.

    Cc: Dmitriy Zavin
    Signed-off-by: Akinobu Mita
    Cc: Gautham R Shenoy
    Cc: Oleg Nesterov
    Cc: Andi Kleen
    Cc: Jan Beulich
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • By previous cpu hotplug notifier change, we don't need to track topology_dev
    existence for each cpu by topology_dev_map.

    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Akinobu Mita
    Cc: Gautham R Shenoy
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • The functions in a CPU notifier chain is called with CPU_UP_PREPARE event
    before making the CPU online. If one of the callback returns NOTIFY_BAD, it
    stops to deliver CPU_UP_PREPARE event, and CPU online operation is canceled.
    Then CPU_UP_CANCELED event is delivered to the functions in a CPU notifier
    chain again.

    This CPU_UP_CANCELED event is delivered to the functions which have been
    called with CPU_UP_PREPARE, not delivered to the functions which haven't been
    called with CPU_UP_PREPARE.

    The problem that makes existing cpu hotplug error handlings complex is that
    the CPU_UP_CANCELED event is delivered to the function that has returned
    NOTIFY_BAD, too.

    Usually we don't expect to call destructor function against the object that
    has failed to initialize. It is like:

    err = register_something();
    if (err) {
    unregister_something();
    return err;
    }

    So it is natural to deliver CPU_UP_CANCELED event only to the functions that
    have returned NOTIFY_OK with CPU_UP_PREPARE event and not to call the function
    that have returned NOTIFY_BAD. This is what this patch is doing.

    Otherwise, every cpu hotplug notifiler has to track whether notifiler event is
    failed or not for each cpu. (drivers/base/topology.c is doing this with
    topology_dev_map)

    Similary this patch makes same thing with CPU_DOWN_PREPARE and CPU_DOWN_FAILED
    evnets.

    Acked-by: Rusty Russell
    Signed-off-by: Akinobu Mita
    Cc: Gautham R Shenoy
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • This patch fixes memory leak in error path.

    In reality, we don't need to call cpuup_canceled(cpu) for now. But upcoming
    cpu hotplug error handling change needs this.

    Cc: Christoph Lameter
    Cc: Gautham R Shenoy
    Acked-by: Pekka Enberg
    Signed-off-by: Akinobu Mita
    Cc: Gautham R Shenoy
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • cpuup_callback() is too long. This patch factors out CPU_UP_CANCELLED and
    CPU_UP_PREPARE handlings from cpuup_callback().

    Cc: Christoph Lameter
    Cc: Pekka Enberg
    Signed-off-by: Akinobu Mita
    Cc: Gautham R Shenoy
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • This version brings a more cautious checkpatch.pl by default. The more
    subjective checks are only applied with the --strict option. It also
    brings the usual slew of corrections for false positives. Of note:

    - new tree detection, the source tree will be found via the executable
    - a major revamp of the unary detection to make it more parser like
    - a new summary at the bottom of the report
    - --strict option for subjective checks
    - --file to enable checking on complete files
    - support for use in emacs "compile" window

    Andy Whitcroft (27):
    Version: 0.11
    fix up cat_vet for the case where there are no control characters
    any cast to a pointer introduces a type
    cpp unary operator detection needs to float
    attributes are also valid in type definitions
    sizeof may be a bareword and makes its argument unary
    unary checks for #ifdef et al need to find end of line
    add new --file mode to handle raw source files
    add --strict/--subjective which enables the subjective tests
    add some additional standard type suffixes
    cpp #elif is also a unary prefix
    case is not a function name
    widen asm volatile exceptions
    __kprobes is a type attribute
    typeof is a unary operator
    function open parenthesis checks should check all occurances
    expand sizeof() binary exceptions
    linux/irq.h should not be recommended
    work harder to find the kernel root and add --root=
    fix --emacs mode line numbers and string concatenation warnings
    add a summary to the bottom of the main report
    loosen assignment in if checks
    update operator spacing to maintain tabs in output
    revamp unary detection
    corruption/line wrapped patches need only reporting once
    revamp s/u/be/le 8/16/32/64 bit types
    handle missing ,1 in uni-diff header

    Mike D. Day (2):
    Adds support to checkpatch.pl for running in the emacs compile window.
    checkpatch: Fix line number reporting

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • If memchr argument is longer than strlen(kp->name), there will be some
    weird result.

    It will casuse duplicate filenames in sysfs for the "nousb". kernel
    warning messages are as bellow:

    sysfs: duplicate filename 'usbcore' can not be created
    WARNING: at fs/sysfs/dir.c:416 sysfs_add_one()
    [] sysfs_add_one+0xa0/0xe0
    [] create_dir+0x48/0xb0
    [] sysfs_create_dir+0x29/0x50
    [] create_dir+0x1b/0x50
    [] kobject_add+0x46/0x150
    [] kobject_init+0x3a/0x80
    [] kernel_param_sysfs_setup+0x50/0xb0
    [] param_sysfs_builtin+0xee/0x130
    [] param_sysfs_init+0x23/0x60
    [] __next_cpu+0x12/0x20
    [] kernel_init+0x0/0xb0
    [] kernel_init+0x0/0xb0
    [] do_initcalls+0x46/0x1e0
    [] create_proc_entry+0x52/0x90
    [] register_irq_proc+0x9c/0xc0
    [] proc_mkdir_mode+0x34/0x50
    [] kernel_init+0x0/0xb0
    [] kernel_init+0x62/0xb0
    [] kernel_thread_helper+0x7/0x14
    =======================
    kobject_add failed for usbcore with -EEXIST, don't try to register things with the same name in the same directory.
    [] kobject_add+0xf6/0x150
    [] kernel_param_sysfs_setup+0x50/0xb0
    [] param_sysfs_builtin+0xee/0x130
    [] param_sysfs_init+0x23/0x60
    [] __next_cpu+0x12/0x20
    [] kernel_init+0x0/0xb0
    [] kernel_init+0x0/0xb0
    [] do_initcalls+0x46/0x1e0
    [] create_proc_entry+0x52/0x90
    [] register_irq_proc+0x9c/0xc0
    [] proc_mkdir_mode+0x34/0x50
    [] kernel_init+0x0/0xb0
    [] kernel_init+0x62/0xb0
    [] kernel_thread_helper+0x7/0x14
    =======================
    Module 'usbcore' failed to be added to sysfs, error number -17
    The system will be unstable now.

    Signed-off-by: Dave Young
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young
     
  • Now that we have DMA_BIT_MASK(), these macros are pointless.

    Cc: Jeremy Fitzhardinge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Remove redundant DMA_..BIT_MASK definitions across two drivers. The
    computation of the majority of the bitmasks is done by the compiler. The
    initial split of the patch touching each a different file got removed due
    to possible git bisect breakage.

    Signed-off-by: Borislav Petkov
    Cc: Jeremy Fitzhardinge
    Cc: Muli Ben-Yehuda
    Cc: Jeff Garzik
    Cc: James Bottomley
    Reviewed-by: Satyam Sharma
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Borislav Petkov
     
  • On platforms that copy sys_tz into the vdso (currently only x86_64, soon to
    include powerpc), it is possible for the vdso to get out of sync if a user
    calls (admittedly unusual) settimeofday(NULL, ptr).

    This patch adds a hook for architectures that set
    CONFIG_GENERIC_TIME_VSYSCALL to ensure when sys_tz is updated they can also
    updatee their copy in the vdso.

    Signed-off-by: Tony Breeds
    Cc: Andi Kleen
    Cc: Tony Luck
    Acked-by: John Stultz
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tony Breeds