02 Nov, 2011
5 commits
-
That should probably be 'CONFIG_DE_AOC'.
Signed-off-by: Paul Bolle
Signed-off-by: David S. Miller -
the tcp and udp code creates a set of struct file_operations at runtime
while it can also be done at compile time, with the added benefit of then
having these file operations be const.the trickiest part was to get the "THIS_MODULE" reference right; the naive
method of declaring a struct in the place of registration would not work
for this reason.Signed-off-by: Arjan van de Ven
Signed-off-by: David S. Miller -
Zheng Liang(lzheng@redhat.com) found a bug that if we config bonding with
arp monitor, sometimes bonding driver cannot get the speed and duplex from
its slaves, it will assume them to be 100Mb/sec and Full, please see
/proc/net/bonding/bond0.
But there is no such problem when uses miimon.(Take igb for example)
I find that the reason is that after dev_open() in bond_enslave(),
bond_update_speed_duplex() will call igb_get_settings()
, but in that function,
it runs ethtool_cmd_speed_set(ecmd, -1); ecmd->duplex = -1;
because igb get an error value of status.
So even dev_open() is called, but the device is not really ready to get its
settings.Maybe it is safe for us to call igb_get_settings() only after
this message shows up, that is "igb: p4p1 NIC Link is Up 1000 Mbps Full Duplex,
Flow Control: RX".So I prefer to update the speed and duplex for a slave when reseices
NETDEV_CHANGE/NETDEV_UP event.Changelog
V2:
1 remove the "fake 100/Full" logic in bond_update_speed_duplex(),
set speed and duplex to -1 when it gets error value of speed and duplex.
2 delete the warning in bond_enslave() if bond_update_speed_duplex() returns
error.
3 make bond_info_show_slave() handle bad values of speed and duplex.Signed-off-by: Weiping Pan
Signed-off-by: David S. Miller -
When (de)configuring a vlan interface, the IFF_ALLMULTI ans IFF_PROMISC
flags are cleared or set on the underlying interface. So, if these flags
are changed on a vlan interface that is not up, the flags underlying
interface might be set or cleared twice.Only propagating flag changes when a device is up makes sure this does
not happen. It also makes sure that an underlying device is not set to
promiscuous or allmulti mode for a vlan device that is down.Signed-off-by: Matthijs Kooijman
Signed-off-by: David S. Miller -
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
01 Nov, 2011
35 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 -
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
-
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 -
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 -
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 -
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
-
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 -
Reported-by: Randy Dunlap
Signed-off-by: Simon Horman
Signed-off-by: Pablo Neira Ayuso -
Also reword the test to make it read more easily (to me)
Signed-off-by: Simon Horman
Signed-off-by: Pablo Neira Ayuso -
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 -
Acked-by: Julian Anastasov
Acked-by Hans Schillstrom
Signed-off-by: Simon Horman
Signed-off-by: Pablo Neira Ayuso -
Acked-by: Julian Anastasov
Acked-by Hans Schillstrom
Signed-off-by: Simon Horman
Signed-off-by: Pablo Neira Ayuso -
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 -
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 -
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 -
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 constantetc
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 -
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
... -
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 -
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 -
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 -
clarify comment
Cc: Huang Ying
Cc: Mathieu Desnoyers
Cc: Peter Zijlstra
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
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 -
There is no functional change.
Signed-off-by: Andy Shevchenko
Acked-by: OGAWA Hirofumi
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
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 -
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 -
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 -
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 whitespaceThe 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 -
Signed-off-by: Wang Sheng-Hui
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
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 -
__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 expressionSince 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 -
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 -
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 -
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 -
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 blinkingdoes 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 -
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
0AFTER 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
100Signed-off-by: Antonio Ospite
Reviewed-by: Johannes Berg
Cc: Richard Purdie
Cc:
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds