Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Reported-and-bisected-by: Rene Meier <r_meier@freenet.de> CC: Marcus Meissner <meissner@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Allow transparent sockets to be less restrictive about
the source ip of ipv6 udp packets being sent.
Google-Bug-Id: 5018138 Signed-off-by: Maciej Żenczykowski <maze@google.com> CC: "Erik Kline" <ek@google.com> CC: "Lorenzo Colitti" <lorenzo@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Felix Fietkau [Mon, 29 Aug 2011 08:06:14 +0000 (10:06 +0200)]
ath9k_hw: fix calibration on 5 ghz
ADC calibrations cannot run on 5 GHz with fast clock enabled. They
need to be disabled, otherwise they'll hang and IQ mismatch calibration
will not be run either.
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Reported-by: Adrian Chadd <adrian@freebsd.org> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
Linus Torvalds [Tue, 30 Aug 2011 17:34:24 +0000 (10:34 -0700)]
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
drm/radeon/kms: add s/r quirk for Compaq Presario V5245EU
drm/radeon/kms: evergreen & ni reset SPI block on CP resume
drm: Fix the number of connector and encoder to cleanup functions
If there are no builtin users of find_next_bit_le() and
find_next_zero_bit_le(), these functions are not present in the kernel
image, causing m68k allmodconfig to fail with:
This started to happen after commit 171d809df189 ("m68k: merge mmu and
non-mmu bitops.h"), as m68k had its own inline versions before.
commit 63e424c84429 ("arch: remove CONFIG_GENERIC_FIND_{NEXT_BIT,
BIT_LE, LAST_BIT}") added find_last_bit.o to obj-y (so it's always
included), but find_next_bit.o to lib-y (so it gets removed by the
linker if there are no builtin users).
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Akinobu Mita <akinobu.mita@gmail.com> Cc: Greg Ungerer <gerg@uclinux.org> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jozsef Kadlecsik [Tue, 30 Aug 2011 13:46:13 +0000 (15:46 +0200)]
netfilter: nf_ct_tcp: wrong multiplication of TCPOLEN_TSTAMP_ALIGNED in tcp_sack skips fastpath
The wrong multiplication of TCPOLEN_TSTAMP_ALIGNED by 4 skips the fast path
for the timestamp-only option. Bug reported by Michael M. Builov (netfilter
bugzilla #738).
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Signed-off-by: Patrick McHardy <kaber@trash.net>
Jozsef Kadlecsik [Tue, 30 Aug 2011 13:45:10 +0000 (15:45 +0200)]
netfilter: nf_ct_tcp: fix incorrect handling of invalid TCP option
Michael M. Builov reported that in the tcp_options and tcp_sack functions
of netfilter TCP conntrack the incorrect handling of invalid TCP option
with too big opsize may lead to read access beyond tcp-packet or buffer
allocated on stack (netfilter bugzilla #738). The fix is to stop parsing
the options at detecting the broken option.
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Signed-off-by: Patrick McHardy <kaber@trash.net>
When both the server and the client are NATed, the set-link-info control
packet containing the peer's call-id field is not properly translated.
I have verified that it was working in 2.6.16.13 kernel previously but
due to rewrite, this scenario stopped working (Not knowing exact version
when it stopped working).
Signed-off-by: Sanket Shah <sanket.shah@elitecore.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
Florian Westphal [Tue, 30 Aug 2011 13:01:20 +0000 (15:01 +0200)]
netfilter: nf_queue: reject NF_STOLEN verdicts from userspace
A userspace listener may send (bogus) NF_STOLEN verdict, which causes skb leak.
This problem was previously fixed via 64507fdbc29c3a622180378210ecea8659b14e40 (netfilter:
nf_queue: fix NF_STOLEN skb leak) but this had to be reverted because
NF_STOLEN can also be returned by a netfilter hook when iterating the
rules in nf_reinject.
Reject userspace NF_STOLEN verdict, as suggested by Michal Miroslaw.
Jerome Glisse [Wed, 24 Aug 2011 20:00:17 +0000 (20:00 +0000)]
drm/radeon/kms: evergreen & ni reset SPI block on CP resume
For some reason SPI block is in broken state after module
unloading. This lead to broken rendering after reloading
module. Fix this by reseting SPI block in CP resume function
Signed-off-by: Jerome Glisse <jglisse@redhat.com Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
Reference ID: RAS1101
From: Michael Holzheu <holzheu@linux.vnet.ibm.com>
PSW restart can be triggered on offline CPUs. If this happens, currently
the PSW restart code fails, because functions like smp_processor_id()
do not work on offline CPUs. This patch fixes this as follows:
If PSW restart is triggered on an offline CPU, the PSW restart (sigp restart)
is done a second time on another CPU that is online and the old CPU is
stopped afterwards.
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Michael Holzheu [Tue, 30 Aug 2011 08:01:13 +0000 (10:01 +0200)]
[S390] kdump: Add size to elfcorehdr kernel parameter
Currently only the address of the pre-allocated ELF header is passed with
the elfcorehdr= kernel parameter. In order to reserve memory for the header
in the 2nd kernel also the size is required. Current kdump architecture
backends use different methods to do that, e.g. x86 uses the memmap= kernel
parameter. On s390 there is no easy way to transfer this information.
Therefore the elfcorehdr kernel parameter is extended to also pass the size.
This now can also be used as standard mechanism by all future kdump
architecture backends.
The syntax of the kernel parameter is extended as follows:
elfcorehdr=[size[KMG]@]offset[KMG]
This change is backward compatible because elfcorehdr=size is still allowed.
Acked-by: Vivek Goyal <vgoyal@redhat.com> Acked-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
On s390 there is a different KEXEC_CONTROL_MEMORY_LIMIT for the normal and
the kdump kexec case. Therefore this patch introduces a new macro
KEXEC_CRASH_CONTROL_MEMORY_LIMIT. This is set to
KEXEC_CONTROL_MEMORY_LIMIT for all architectures that do not define
KEXEC_CRASH_CONTROL_MEMORY_LIMIT.
Acked-by: Vivek Goyal <vgoyal@redhat.com> Acked-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Sebastian Ott [Tue, 30 Aug 2011 08:01:10 +0000 (10:01 +0200)]
[S390] cio: add message for timeouts on internal I/O
Print a message in case we do not receive an IRQ in time (for internal
I/O). Also print the ID of the last used channel path, since it is
possible that not the device itself but this specific path might have
a defect.
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
NeilBrown [Tue, 30 Aug 2011 06:20:17 +0000 (16:20 +1000)]
md: fix clearing of 'blocked' flag in the presence of bad blocks.
When the 'blocked' flag on a device is cleared while there are
unacknowledged bad blocks we must fail the device. This is needed for
backwards compatability of the interface.
The code currently uses the wrong test for "unacknowledged bad blocks
exist". Change it to the right test.
Antonio Ospite [Tue, 30 Aug 2011 01:17:03 +0000 (11:17 +1000)]
After commit 38829dc highlight that if _only_one_ branch of a
conditional statement is a single statement, then braces are to be used
on both branches.
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Jean Delvare [Tue, 30 Aug 2011 01:16:56 +0000 (11:16 +1000)]
hwmon: (lm90) Make code more readable
Clean up the code to make it more readable:
* Remove reg_ and new_ prefixes from variable names, they made the
names longer, causing extra line breaks, while not adding much
value.
* Introduce struct device dev* = &client->dev in two functions, to
avoid repeating client->dev everywhere in these functions.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Tue, 30 Aug 2011 01:16:56 +0000 (11:16 +1000)]
hwmon: (lm90) Fix warnings
With some configuration option combinations, we get the following
warnings:
drivers/hwmon/lm90.c: In function 'lm90_detect':
drivers/hwmon/lm90.c:1114: warning: 'chip_id' may be used uninitialized
in this function
drivers/hwmon/lm90.c:1114: warning: 'reg_config1' may be used
uninitialized in this function
drivers/hwmon/lm90.c:1114: warning: 'reg_convrate' may be used
uninitialized in this function
drivers/hwmon/lm90.c:1187: warning: 'reg_emerg2' may be used
uninitialized in this function
drivers/hwmon/lm90.c:1187: warning: 'reg_status2' may be used
uninitialized in this function
We can solve these easily by reading the register values first and
checking for errors later. These errors should be very rare, even in
the case of failed detection, so this change has no impact on
performance. And this makes checkpatch.pl happier.
Jean Delvare [Tue, 30 Aug 2011 01:16:55 +0000 (11:16 +1000)]
hwmon: (ibmaem) Avoid repeated memory allocations
Preallocate a buffer for the response to sensor reads, and reuse it
for each read instead of allocating a new one each time. This should
be faster and should also avoid memory fragmentation.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Darrick J. Wong <djwong@us.ibm.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Tue, 30 Aug 2011 01:16:55 +0000 (11:16 +1000)]
hwmon: (ibmaem) Fix error paths
I am under the impression that error paths in functions
aem_init_aem1_inst() and aem_init_aem2_inst() are incorrect. In
several cases, the function returns 0 on error, which I suspect is
not intended. Fix this by properly tracking error codes.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Darrick J. Wong <djwong@us.ibm.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Dean Nelson [Tue, 30 Aug 2011 01:16:55 +0000 (11:16 +1000)]
hwmon: Avoid building drivers for powerpc that read/write ISA addresses
A modprobe of hwmon drivers that read/write ISA addresses on a powerpc results
in a kernel Oops. These reads/writes are being done via the inb()/in_8() and
outb()/out_8() macros.
Prevent these drivers from being built for powerpc.
Signed-off-by: Dean Nelson <dnelson@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/i2c/busses/i2c-elektor.c: In function ‘pcf_isa_init’:
drivers/i2c/busses/i2c-elektor.c:153: error: implicit declaration of function ‘ioport_map’
drivers/i2c/busses/i2c-elektor.c:153: warning: assignment makes pointer from integer without a cast
drivers/i2c/busses/i2c-elektor.c: In function ‘elektor_probe’:
drivers/i2c/busses/i2c-elektor.c:287: error: implicit declaration of function ‘ioport_unmap’
Since commit 82ed223c264def2b15ee4bec2e8c3048092ceb5f ("iomap: make IOPORT/PCI
mapping functions conditional"), ioport_map() is only available on platforms
that set HAS_IOPORT.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Jean Delvare <khali@linuxfr.org>
Kukjin Kim [Wed, 24 Aug 2011 08:25:09 +0000 (17:25 +0900)]
ARM: EXYNOS4: Add support SMDK4212 Board
This patch adds mach-smdk4212.c to support SMDK4212 board.
Now it can support HSMMCs, I2Cs, RTC, WDT and Keypad. Other
features will be supported next time.
Jonghwan Choi [Wed, 24 Aug 2011 12:52:45 +0000 (21:52 +0900)]
ARM: EXYNOS4: Add support PM for EXYNOS4212
This patch moves regarding clock stuff of PM into clock
file to support PM on EXYNOS4210 and EXYNOS4212 with one
single kernel image. Because some clock registers are
different on each SoCs.
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Kukjin Kim [Wed, 24 Aug 2011 08:25:09 +0000 (17:25 +0900)]
ARM: EXYNOS4: Add support clock for EXYNOS4212
This patch splits EXYNOS4 clock code to EXYNOS4 common,
EXYNOS4210 and EXYNOS4212 for supporting new EXYNOS4212
SoC with one kernel image. Of course, this patch adds
some clock codes for EXYNOS4212 SoC.