02 Nov, 2011

1 commit

  • Whatever situations make this state legitimate when SMP
    also would be legitimate when !SMP and f.e. preemption is
    enabled.

    This is dubious enough that we should just delete it entirely. If we
    want to add debugging for neigh timer races, better more thorough
    mechanisms are needed.

    Signed-off-by: David S. Miller

    David S. Miller
     

01 Nov, 2011

39 commits

  • commit f15850861860636c905b33a9a5be3dcbc2b0d56a
    (netfilter: nfnetlink_queue: return error number to caller)
    erronously assigns the return value of nf_queue() to the "ret" value.

    This can cause bogus return values if we encounter QUEUE verdict
    when bypassing is enabled, the listener does not exist and the
    next hook returns NF_STOLEN.

    In this case nf_hook_slow returned -ESRCH instead of 0.

    Signed-off-by: Florian Westphal
    Signed-off-by: Pablo Neira Ayuso

    Florian Westphal
     
  • Marc Boucher, James Morris and Rusty Russell were crucial in the
    early netfilter days. We thank them all!

    However, they are not actively maintaining netfilter anymore.

    This patch adds myself as netfilter maintainer.

    Signed-off-by: Pablo Neira Ayuso

    Pablo Neira Ayuso
     
  • Several callers (h323 conntrack, xt_addrtype) assume that the
    returned **dst only needs to be released if the function returns 0.

    This is true for the ipv4 implementation, but not for the ipv6 one.

    Instead of changing the users, change the ipv6 implementation
    to behave like the ipv4 version by only providing the dst_entry result
    in the success case.

    Signed-off-by: Florian Westphal
    Signed-off-by: Pablo Neira Ayuso

    Florian Westphal
     
  • This is to address the following error during the compilation:

    In file included from kernel/sysctl_binary.c:6:
    include/net/ip_vs.h:1406: error: expected identifier or ‘(’ before ‘{’ token
    make[1]: *** [kernel/sysctl_binary.o] Error 1
    make[1]: *** Waiting for unfinished jobs....

    That manifests itself when CONFIG_IP_VS_NFCT is undefined in .config file.

    Signed-off-by: Krzysztof Wilczynski
    Signed-off-by: Simon Horman

    Krzysztof Wilczynski
     
  • This is to address the following warning during compilation time:

    net/netfilter/ipvs/ip_vs_core.c: In function ‘ip_vs_leave’:
    net/netfilter/ipvs/ip_vs_core.c:532: warning: unused variable ‘cs’

    This variable is indeed no longer in use.

    Signed-off-by: Krzysztof Wilczynski
    Signed-off-by: Simon Horman

    Krzysztof Wilczynski
     
  • This patch exports several definitions that used to live under
    include/net/netfilter/nf_nat.h. These definitions, although not
    exported, have been used by iptables and other userspace
    applications like miniupnpd since long time. Basically, these
    userspace tools included some internal definition of the required
    structures and they assume no changes in the binary representation
    (which is OK indeed).

    To resolve this situation, this patch makes public the required
    structure and install them in INSTALL_HDR_PATH.

    See: https://bugs.gentoo.org/376873, for more information.

    This patch is heavily based on the initial patch sent by:

    Anthony G. Basile

    Which was entitled:

    netfilter: export sanitized nf_nat.h to INSTALL_HDR_PATH

    Signed-off-by: Pablo Neira Ayuso

    Pablo Neira Ayuso
     
  • Site specific OOM messages are duplications of a generic MM
    out of memory message and aren't really useful, so just
    delete them.

    Signed-off-by: Joe Perches
    Signed-off-by: Patrick McHardy
    Signed-off-by: Pablo Neira Ayuso

    Joe Perches
     
  • Reported-by: Randy Dunlap
    Signed-off-by: Simon Horman
    Signed-off-by: Pablo Neira Ayuso

    Simon Horman
     
  • Also reword the test to make it read more easily (to me)

    Signed-off-by: Simon Horman
    Signed-off-by: Pablo Neira Ayuso

    Simon Horman
     
  • ipvs is not used in ip_vs_genl_set_cmd() or ip_vs_genl_get_cmd()

    Acked-by: Julian Anastasov
    Acked-by Hans Schillstrom
    Signed-off-by: Simon Horman
    Signed-off-by: Pablo Neira Ayuso

    Simon Horman
     
  • Acked-by: Julian Anastasov
    Acked-by Hans Schillstrom
    Signed-off-by: Simon Horman
    Signed-off-by: Pablo Neira Ayuso

    Simon Horman
     
  • Acked-by: Julian Anastasov
    Acked-by Hans Schillstrom
    Signed-off-by: Simon Horman
    Signed-off-by: Pablo Neira Ayuso

    Simon Horman
     
  • Add missing documentation for conntrack, snat_reroute and sync_version.

    Also fix up a typo, IPVS_DEBUG should be IP_VS_DEBUG.

    Acked-by: Julian Anastasov
    Acked-by Hans Schillstrom
    Signed-off-by: Simon Horman
    Signed-off-by: Pablo Neira Ayuso

    Simon Horman
     
  • This is to expose "ports" parameter via sysfs so it can be read
    at any time in order to determine what port or ports were passed
    to the module at the point when it was loaded.

    Signed-off-by: Krzysztof Wilczynski
    Signed-off-by: Simon Horman
    Signed-off-by: Pablo Neira Ayuso

    Krzysztof Wilczynski
     
  • Fixes parameter name of skb_frag_dmamap function to silence warning on
    make htmldocs.

    Signed-off-by: Marcos Paulo de Souza
    Signed-off-by: David S. Miller

    Marcos Paulo de Souza
     
  • The `#define filename' screws up the expansion of
    DEFINE_DYNAMIC_DEBUG_METADATA:

    drivers/net/ethernet/i825xx/3c505.c: In function 'send_pcb':
    drivers/net/ethernet/i825xx/3c505.c:390: error: expected identifier before string constant
    drivers/net/ethernet/i825xx/3c505.c:390: error: expected '}' before '.' token
    drivers/net/ethernet/i825xx/3c505.c:436: error: expected identifier before string constant
    drivers/net/ethernet/i825xx/3c505.c:435: error: expected '}' before '.' token
    drivers/net/ethernet/i825xx/3c505.c: In function 'start_receive':
    drivers/net/ethernet/i825xx/3c505.c:557: error: expected identifier before string constant
    drivers/net/ethernet/i825xx/3c505.c:557: error: expected '}' before '.' token
    drivers/net/ethernet/i825xx/3c505.c: In function 'receive_packet':
    drivers/net/ethernet/i825xx/3c505.c:629: error: expected identifier before string constant

    etc

    So remove that #define and "open-code" it.

    Cc: Philip Blundell
    Cc: David Miller
    Cc: Jason Baron
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Andrew Morton
     
  • Quoth Andrew:

    - Most of MM. Still waiting for the poweroc guys to get off their
    butts and review some threaded hugepages patches.

    - alpha

    - vfs bits

    - drivers/misc

    - a few core kerenl tweaks

    - printk() features

    - MAINTAINERS updates

    - backlight merge

    - leds merge

    - various lib/ updates

    - checkpatch updates

    * akpm: (127 commits)
    epoll: fix spurious lockdep warnings
    checkpatch: add a --strict check for utf-8 in commit logs
    kernel.h/checkpatch: mark strict_strto and simple_strto as obsolete
    llist-return-whether-list-is-empty-before-adding-in-llist_add-fix
    wireless: at76c50x: follow rename pack_hex_byte to hex_byte_pack
    fat: follow rename pack_hex_byte() to hex_byte_pack()
    security: follow rename pack_hex_byte() to hex_byte_pack()
    kgdb: follow rename pack_hex_byte() to hex_byte_pack()
    lib: rename pack_hex_byte() to hex_byte_pack()
    lib/string.c: fix strim() semantics for strings that have only blanks
    lib/idr.c: fix comment for ida_get_new_above()
    lib/percpu_counter.c: enclose hotplug only variables in hotplug ifdef
    lib/bitmap.c: quiet sparse noise about address space
    lib/spinlock_debug.c: print owner on spinlock lockup
    lib/kstrtox: common code between kstrto*() and simple_strto*() functions
    drivers/leds/leds-lp5521.c: check if reset is successful
    leds: turn the blink_timer off before starting to blink
    leds: save the delay values after a successful call to blink_set()
    drivers/leds/leds-gpio.c: use gpio_get_value_cansleep() when initializing
    drivers/leds/leds-lm3530.c: add __devexit_p where needed
    ...

    Linus Torvalds
     
  • epoll can acquire recursively acquire ep->mtx on multiple "struct
    eventpoll"s at once in the case where one epoll fd is monitoring another
    epoll fd. This is perfectly OK, since we're careful about the lock
    ordering, but it causes spurious lockdep warnings. Annotate the recursion
    using mutex_lock_nested, and add a comment explaining the nesting rules
    for good measure.

    Recent versions of systemd are triggering this, and it can also be
    demonstrated with the following trivial test program:

    --------------------8
    Tested-by: Paul Bolle
    Signed-off-by: Nelson Elhage
    Acked-by: Jason Baron
    Cc: Dave Jones
    Cc: Davide Libenzi
    Cc:
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nelson Elhage
     
  • Some find using utf-8 in commit logs inappropriate.

    Some patch commit logs contain unintended utf-8 characters when doing
    things like copy/pasting compilation output.

    Look for the start of any commit log by skipping initial lines that look
    like email headers and "From: " lines.

    Stop looking for utf-8 at the first signature line.

    Signed-off-by: Joe Perches
    Suggested-by: Andrew Morton
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Mark obsolete/deprecated strict_strto and simple_strto functions
    and macros as obsolete.

    Update checkpatch to warn about their use.

    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • clarify comment

    Cc: Huang Ying
    Cc: Mathieu Desnoyers
    Cc: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • There is no functional change.

    Signed-off-by: Andy Shevchenko
    Acked-by: John W. Linville
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Shevchenko
     
  • There is no functional change.

    Signed-off-by: Andy Shevchenko
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Shevchenko
     
  • There is no functional change.

    Signed-off-by: Andy Shevchenko
    Cc: Mimi Zohar
    Cc: James Morris
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Shevchenko
     
  • There is no functional change.

    Signed-off-by: Andy Shevchenko
    Acked-by: Jesper Nilsson
    Cc: David Howells
    Cc: Koichi Yasutake
    Cc: Jason Wessel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Shevchenko
     
  • As suggested by Andrew Morton in [1] there is better to have most
    significant part first in the function name.

    [1] https://lkml.org/lkml/2011/9/20/22

    There is no functional change.

    Signed-off-by: Andy Shevchenko
    Cc: Jesper Nilsson
    Cc: David Howells
    Cc: Koichi Yasutake
    Cc: Jason Wessel
    Cc: Mimi Zohar
    Cc: James Morris
    Cc: OGAWA Hirofumi
    Cc: "John W. Linville"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Shevchenko
     
  • Commit 84c95c9acf0 ("string: on strstrip(), first remove leading spaces
    before running over str") improved the performance of the strim()
    function.

    Unfortunately this changed the semantics of strim() and broke my code.
    Before the patch it was possible to use strim() without using the return
    value for removing trailing spaces from strings that had either only
    blanks or only trailing blanks.

    Now this does not work any longer for strings that *only* have blanks.

    Before patch: " " -> "" (empty string)
    After patch: " " -> " " (no change)

    I think we should remove your patch to restore the old behavior.

    The description (lib/string.c):

    * Note that the first trailing whitespace is replaced with a %NUL-terminator

    => The first trailing whitespace of a string that only has whitespace
    characters is the first whitespace

    The patch restores the old strim() semantics.

    Signed-off-by: Michael Holzheu
    Cc: Andre Goddard Rosa
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Holzheu
     
  • Signed-off-by: Wang Sheng-Hui
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wang Sheng-Hui
     
  • These variables are only used when CONFIG_HOTPLUG_CPU is enabled, they are
    ifdef'ed everywhere else. So don't define them when CONFIG_HOTPLUG_CPU is
    not enabled.

    Signed-off-by: Glauber Costa
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Glauber Costa
     
  • __bitmap_parse() and __bitmap_parselist() both take a pointer to a kernel
    buffer as a parameter and then cast it to a pointer to user buffer for use
    in cases when the parameter is_user indicates that the buffer is actually
    located in user space. This casting, and the casts in the callers,
    results in sparse noise like the following:

    warning: incorrect type in initializer (different address spaces)
    expected char const [noderef] *ubuf
    got char const *buf
    warning: cast removes address space of expression

    Since these casts are intentional, use __force to quiet the noise.

    Signed-off-by: H Hartley Sweeten
    Cc: Len Brown
    Cc: Huang Ying
    Cc: Andy Shevchenko
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    H Hartley Sweeten
     
  • When SPIN_BUG_ON is triggered, the lock owner information is reported.
    But it is omitted when spinlock lockup is detected.

    This information is useful especially on the architectures which don't
    implement trigger_all_cpu_backtrace() that is called just after detecting
    lockup. So report it and also avoid message format duplication.

    Signed-off-by: Akinobu Mita
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • Currently termination logic (\0 or \n\0) is hardcoded in _kstrtoull(),
    avoid that for code reuse between kstrto*() and simple_strtoull().
    Essentially, make them different only in termination logic.

    simple_strtoull() (and scanf(), BTW) ignores integer overflow, that's a
    bug we currently don't have guts to fix, making KSTRTOX_OVERFLOW hack
    necessary.

    Almost forgot: patch shrinks code size by about ~80 bytes on x86_64.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Make sure that the reset is successful by issuing a dummy read to R
    channel current register and check its default value. On some platforms,
    without this dummy read, any further access to {R/G/B}_EXEC will not have
    any impact.

    [akpm@linux-foundation.org: fix up code comment]
    Signed-off-by: srinidhi kasagar
    Tested-by: Naga Radhesh
    Acked-by: Linus Walleij
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Srinidhi KASAGAR
     
  • Depending on the implementation of the hardware blinking function in
    blink_set(), the led can support hardware blinking for some values of
    delay_on and delay_off and fall-back to software blinking for some other
    values.

    Turning off the blink_timer unconditionally before starting to blink
    make sure that a sequence like:

    OFF
    hardware blinking
    software blinking
    hardware blinking

    does not leave the software blinking timer active.

    Signed-off-by: Antonio Ospite
    Reviewed-by: Johannes Berg
    Cc: Richard Purdie
    Cc:
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Antonio Ospite
     
  • When calling the hardware blinking function implemented by blink_set(),
    the delay_on and delay_off values are not preserved across calls.

    Fix that and make the "timer" trigger work as expected when hardware
    blinking is available.

    BEFORE the fix:
    $ cd /sys/class/leds/someled
    $ echo timer > trigger
    $ cat delay_on delay_off
    0
    0
    $ echo 100 > delay_on
    $ cat delay_on delay_off
    0
    0
    $ echo 100 > delay_off
    $ cat delay_on delay_off
    0
    0

    AFTER the fix:
    $ cd /sys/class/leds/someled
    $ echo timer > trigger
    $ cat delay_on delay_off
    0
    0
    $ echo 100 > delay_on
    $ cat delay_on delay_off
    100
    0
    $ echo 100 > delay_off
    $ cat delay_on delay_off
    100
    100

    Signed-off-by: Antonio Ospite
    Reviewed-by: Johannes Berg
    Cc: Richard Purdie
    Cc:
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Antonio Ospite
     
  • I get the following warning:

    ------------[ cut here ]------------
    WARNING: at drivers/gpio/gpiolib.c:1559 __gpio_get_value+0x90/0x98()
    Modules linked in:
    Call Trace:
    [] dump_stack+0x8/0x34
    [] warn_slowpath_common+0x78/0xa0
    [] __gpio_get_value+0x90/0x98
    [] create_gpio_led+0xdc/0x194
    [] gpio_led_probe+0x290/0x36c
    [] driver_probe_device+0x78/0x1b0
    [] __driver_attach+0xc0/0xc8
    [] bus_for_each_dev+0x64/0xb0
    [] bus_add_driver+0x1c8/0x2a8
    [] driver_register+0x90/0x180
    [] do_one_initcall+0x38/0x160

    ---[ end trace ee38723fbefcd65c ]---

    My GPIOs are on an I2C port expander, so we must use the *_cansleep()
    variant of the GPIO functions. This is was not being done in
    create_gpio_led().

    We can change gpio_get_value() to gpio_get_value_cansleep() because it is
    only called from the platform_driver probe function, which is a context
    where we can sleep.

    Only tested on my gpio_cansleep() system, but it seems safe for all
    systems.

    Signed-off-by: David Daney
    Cc: Richard Purdie
    Acked-by: Trent Piepho
    Cc: Grant Likely
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Daney
     
  • According to the comments in include/linux/init.h:

    "Pointers to __devexit functions must use __devexit_p(function_name), the
    wrapper will insert either the function_name or NULL, depending on the config
    options."

    We have __devexit annotation for lm3530_remove(), so add __devexit_p to
    the `struct i2c_driver'.

    Signed-off-by: Axel Lin
    Cc: Shreshtha Kumar SAHU
    Cc: Richard Purdie
    Acked-by: Linus Walleij
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • If lp5521_read fails, engine_state variable is not initialized.
    If lp5521_read fails, we should return error.
    This patch fixes below warning.

    CC drivers/leds/leds-lp5521.o
    drivers/leds/leds-lp5521.c: In function 'lp5521_set_engine_mode':
    drivers/leds/leds-lp5521.c:168: warning: 'engine_state' may be used uninitialized in this function

    [akpm@linux-foundation.org: remove unneeded "ret |="]
    Signed-off-by: Axel Lin
    Cc: Samu Onkalo
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • Use the platform_data include directory for the TPU LED driver, as
    suggested by Paul Mundt.

    Signed-off-by: Magnus Damm
    Cc: Paul Mundt
    Cc: Richard Purdie
    Cc: Grant Likely
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Magnus Damm