Trond Myklebust [Fri, 20 Apr 2012 23:24:51 +0000 (19:24 -0400)]
NFSv4: Ensure we do not reuse open owner names
The NFSv4 spec is ambiguous about whether or not it is permissible
to reuse open owner names, so play it safe. This patch adds a timestamp
to the state_owner structure, and combines that with the IDA based
uniquifier.
Fixes a regression whereby the Linux server returns NFS4ERR_BAD_SEQID.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Jan Kara [Fri, 2 Sep 2011 23:09:43 +0000 (01:09 +0200)]
nfs: Enclose hostname in brackets when needed in nfs_do_root_mount
When hostname contains colon (e.g. when it is an IPv6 address) it needs
to be enclosed in brackets to make parsing of NFS device string possible.
Fix nfs_do_root_mount() to enclose hostname properly when needed. NFS code
actually does not need this as it does not parse the string passed by
nfs_do_root_mount() but the device string is exposed to userspace in
/proc/mounts.
CC: Josh Boyer <jwboyer@redhat.com>
CC: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Fred Isaman [Fri, 20 Apr 2012 18:47:35 +0000 (14:47 -0400)]
NFS: put open context on error in nfs_flush_multi
Cc: <stable@vger.kernel.org>
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Fred Isaman [Fri, 20 Apr 2012 18:47:34 +0000 (14:47 -0400)]
NFS: put open context on error in nfs_pagein_multi
Cc: <stable@vger.kernel.org>
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Trond Myklebust [Wed, 18 Apr 2012 20:29:11 +0000 (16:29 -0400)]
NFSv4: Fix open(O_TRUNC) and ftruncate() error handling
If the file wasn't opened for writing, then truncate and ftruncate
need to report the appropriate errors.
Reported-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
Trond Myklebust [Wed, 18 Apr 2012 16:48:35 +0000 (12:48 -0400)]
NFSv4: Ensure that we check lock exclusive/shared type against open modes
Since we may be simulating flock() locks using NFS byte range locks,
we can't rely on the VFS having checked the file open mode for us.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
Trond Myklebust [Wed, 18 Apr 2012 16:20:10 +0000 (12:20 -0400)]
NFSv4: Ensure that the LOCK code sets exception->inode
All callers of nfs4_handle_exception() that need to handle
NFS4ERR_OPENMODE correctly should set exception->inode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
Fred Isaman [Thu, 5 Apr 2012 19:26:36 +0000 (15:26 -0400)]
NFS: check for req==NULL in nfs_try_to_update_request cleanup
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Stanislav Kinsbursky [Thu, 5 Apr 2012 17:04:37 +0000 (21:04 +0400)]
SUNRPC: register PipeFS file system after pernet sybsystem
PipeFS superblock creation routine relays on SUNRPC pernet data presense, which
is created on register_pernet_subsys() call in SUNRPC module init function.
Registering of PipeFS filesystem prior to registering of per-net subsystem
leads to races (mount of PipeFS can dereference uninitialized data).
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Linus Torvalds [Thu, 5 Apr 2012 00:26:08 +0000 (17:26 -0700)]
Merge tag 'for_linus-3.4-rc2' of git://git./linux/kernel/git/jwessel/kgdb
Pull KGDB/KDB regression fixes from Jason Wessel:
- Fix a Smatch warning that appeared in the 3.4 merge window
- Fix kgdb test suite with SMP for all archs without HW single stepping
- Fix kgdb sw breakpoints with CONFIG_DEBUG_RODATA=y limitations on x86
- Fix oops on kgdb test suite with CONFIG_DEBUG_RODATA
- Fix kgdb test suite with SMP for all archs with HW single stepping
* tag 'for_linus-3.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb:
x86,kgdb: Fix DEBUG_RODATA limitation using text_poke()
kgdb,debug_core: pass the breakpoint struct instead of address and memory
kgdbts: (2 of 2) fix single step awareness to work correctly with SMP
kgdbts: (1 of 2) fix single step awareness to work correctly with SMP
kgdbts: Fix kernel oops with CONFIG_DEBUG_RODATA
kdb: Fix smatch warning on dbg_io_ops->is_console
Linus Torvalds [Thu, 5 Apr 2012 00:13:43 +0000 (17:13 -0700)]
Merge branch 'for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping
Pull DMA mapping branch from Marek Szyprowski:
"Short summary for the whole series:
A few limitations have been identified in the current dma-mapping
design and its implementations for various architectures. There exist
more than one function for allocating and freeing the buffers:
currently these 3 are used dma_{alloc, free}_coherent,
dma_{alloc,free}_writecombine, dma_{alloc,free}_noncoherent.
For most of the systems these calls are almost equivalent and can be
interchanged. For others, especially the truly non-coherent ones
(like ARM), the difference can be easily noticed in overall driver
performance. Sadly not all architectures provide implementations for
all of them, so the drivers might need to be adapted and cannot be
easily shared between different architectures. The provided patches
unify all these functions and hide the differences under the already
existing dma attributes concept. The thread with more references is
available here:
http://www.spinics.net/lists/linux-sh/msg09777.html
These patches are also a prerequisite for unifying DMA-mapping
implementation on ARM architecture with the common one provided by
dma_map_ops structure and extending it with IOMMU support. More
information is available in the following thread:
http://thread.gmane.org/gmane.linux.kernel.cross-arch/12819
More works on dma-mapping framework are planned, especially in the
area of buffer sharing and managing the shared mappings (together with
the recently introduced dma_buf interface: commit
d15bd7ee445d
"dma-buf: Introduce dma buffer sharing mechanism").
The patches in the current set introduce a new alloc/free methods
(with support for memory attributes) in dma_map_ops structure, which
will later replace dma_alloc_coherent and dma_alloc_writecombine
functions."
People finally started piping up with support for merging this, so I'm
merging it as the last of the pending stuff from the merge window.
Looks like pohmelfs is going to wait for 3.5 and more external support
for merging.
* 'for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
common: DMA-mapping: add NON-CONSISTENT attribute
common: DMA-mapping: add WRITE_COMBINE attribute
common: dma-mapping: introduce mmap method
common: dma-mapping: remove old alloc_coherent and free_coherent methods
Hexagon: adapt for dma_map_ops changes
Unicore32: adapt for dma_map_ops changes
Microblaze: adapt for dma_map_ops changes
SH: adapt for dma_map_ops changes
Alpha: adapt for dma_map_ops changes
SPARC: adapt for dma_map_ops changes
PowerPC: adapt for dma_map_ops changes
MIPS: adapt for dma_map_ops changes
X86 & IA64: adapt for dma_map_ops changes
common: dma-mapping: introduce generic alloc() and free() methods
Linus Torvalds [Wed, 4 Apr 2012 21:26:40 +0000 (14:26 -0700)]
Merge tag 'pm-for-3.4-part-2' of git://git./linux/kernel/git/rafael/linux-pm
Pull more power management updates from Rafael Wysocki:
- Patch series that hopefully fixes races between the freezer and
request_firmware() and request_firmware_nowait() for good, with two
cleanups from Stephen Boyd on top.
- Runtime PM fix from Alan Stern preventing tasks from getting stuck
indefinitely in the runtime PM wait queue.
- Device PM QoS update from MyungJoo Ham introducing a new variant of
pm_qos_update_request() allowing the callers to specify a timeout.
* tag 'pm-for-3.4-part-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
PM / QoS: add pm_qos_update_request_timeout() API
firmware_class: Move request_firmware_nowait() to workqueues
firmware_class: Reorganize fw_create_instance()
PM / Sleep: Mitigate race between the freezer and request_firmware()
PM / Sleep: Move disabling of usermode helpers to the freezer
PM / Hibernate: Disable usermode helpers right before freezing tasks
firmware_class: Do not warn that system is not ready from async loads
firmware_class: Split _request_firmware() into three functions, v2
firmware_class: Rework usermodehelper check
PM / Runtime: don't forget to wake up waitqueue on failure
Linus Torvalds [Wed, 4 Apr 2012 17:11:24 +0000 (10:11 -0700)]
Merge branch 'selinux' ("struct common_audit_data" sanitizer)
Merge common_audit_data cleanup patches from Eric Paris.
This is really too late, but it's a long-overdue cleanup of the costly
wrapper functions for the security layer.
The "struct common_audit_data" is used all over in critical paths,
allocated and initialized on the stack. And used to be much too large,
causing not only unnecessarily big stack frames but the clearing of the
(mostly useless) data was also very visible in profiles.
As a particular example, in one microbenchmark for just doing "stat()"
over files a lot, selinux_inode_permission() used 7% of the CPU time.
That's despite the fact that it doesn't actually *do* anything: it is
just a helper wrapper function in the selinux security layer.
This patch-series shrinks "struct common_audit_data" sufficiently that
code generation for these kinds of wrapper functions is improved
noticeably, and we spend much less time just initializing data that we
will never use.
The functions still get called all the time, and it still shows up at
3.5+% in my microbenchmark, but it's quite a bit lower down the list,
and much less noticeable.
* Emailed patches from Eric Paris <eparis@redhat.com>:
lsm_audit: don't specify the audit pre/post callbacks in 'struct common_audit_data'
SELinux: do not allocate stack space for AVC data unless needed
SELinux: remove avd from slow_avc_audit()
SELinux: remove avd from selinux_audit_data
LSM: shrink the common_audit_data data union
LSM: shrink sizeof LSM specific portion of common_audit_data
Linus Torvalds [Wed, 4 Apr 2012 17:10:14 +0000 (10:10 -0700)]
Merge tag 'regmap-3.4' of git://git./linux/kernel/git/broonie/regmap
Pull a single regmap fix from Mark Brown:
"A simple bug that's been lurking for a while but not terribly visible
since a high proportion of chips have no register 0 so the normal
failure is that we end up doing a bit of extra I/O."
* tag 'regmap-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
regmap: rbtree: Fix register default look-up in sync
Linus Torvalds [Wed, 4 Apr 2012 17:09:30 +0000 (10:09 -0700)]
Merge tag 'regulator-3.4' of git://git./linux/kernel/git/broonie/regulator
Pull regulator fixes from Mark Brown:
"A bunch of smallish fixes that came up during the merge window as
things got more testing - even more fixes from Axel, a fix for error
handling in more complex systems using -EPROBE_DEFER and a couple of
small fixes for the new dummy regulators."
* tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
regulator: Remove non-existent parameter from fixed-helper.c kernel doc
regulator: Fix setting new voltage in s5m8767_set_voltage
regulator: fix sysfs name collision between dummy and fixed dummy regulator
regulator: Fix deadlock on removal of regulators with supplies
regulator: Fix comments in include/linux/regulator/machine.h
regulator: Only update [LDOx|DCx]_HIB_MODE bits in wm8350_[ldo|dcdc]_set_suspend_disable
regulator: Fix setting low power mode for wm831x aldo
regulator: Return microamps in wm8350_isink_get_current
regulator: wm8350: Fix the logic to choose best current limit setting
regulator: wm831x-isink: Fix the logic to choose best current limit setting
regulator: wm831x-dcdc: Fix the logic to choose best current limit setting
regulator: anatop: patching to device-tree property "reg".
regulator: Do proper shift to set correct bit for DC[2|5]_HIB_MODE setting
regulator: Fix restoring pmic.dcdcx_hib_mode settings in wm8350_dcdc_set_suspend_enable
regulator: Fix unbalanced lock/unlock in mc13892_regulator_probe error path
regulator: Fix set and get current limit for wm831x_buckv
regulator: tps6586x: Fix list minimal voltage setting for LDO0
Linus Torvalds [Wed, 4 Apr 2012 17:04:42 +0000 (10:04 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar.
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf/x86/p4: Add format attributes
tracing, sched, vfs: Fix 'old_pid' usage in trace_sched_process_exec()
Linus Torvalds [Wed, 4 Apr 2012 17:04:01 +0000 (10:04 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar.
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86, kvm: Call restore_sched_clock_state() only after %gs is initialized
x86: Use -mno-avx when available
x86: Remove the ancient and deprecated disable_hlt() and enable_hlt() facility
x86: Preserve lazy irq disable semantics in fixup_irqs()
Linus Torvalds [Wed, 4 Apr 2012 16:03:41 +0000 (09:03 -0700)]
Merge tag 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/linux-staging
Pull hwmon patches from Guenter Roeck:
- Fix crash in ad7314 driver
- Add support for AMD Trinity CPUs to k10temp driver
- Fix __initdata/__initconst mixup in w83627ehf driver
- Fix runtime warnings in acpi_power_meter and max6639 drivers
- Fix build warnings in adm1031, f75375s, sht15, and gpio-fan drivers
* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: (ad7314) Adds missing spi_dev initialization
hwmon: (k10temp) Add support for AMD Trinity CPUs
hwmon: (w83627ehf) mark const init data with __initconst instead of __initdata
hwmon: (acpi_power_meter) fix lockdep spew due to non-static lock class
hwmon: (adm1031) Fix compiler warning
hwmon: (f75375s) Fix warning message seen in some configurations
hwmon: (max6639) Convert to dev_pm_ops
hwmon: (sht15) Fix Kconfig dependencies
hwmon: (gpio-fan) Fix Kconfig dependencies
Linus Torvalds [Wed, 4 Apr 2012 16:02:38 +0000 (09:02 -0700)]
Merge tag 'mce-fix-for-3.4' of git://git./linux/kernel/git/bp/bp
Pull MCE fixlet from Borislav Petkov:
"One fix which makes MCE decoding much more "liberal" wrt families."
* tag 'mce-fix-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
MCE, AMD: Drop too granulary family model checks
Linus Torvalds [Wed, 4 Apr 2012 15:31:06 +0000 (08:31 -0700)]
Merge tag 'md-3.4-fixes' of git://neil.brown.name/md
Pull assorted md fixes from Neil Brown:
- some RAID levels didn't clear up properly if md_integrity_register
failed
- a 'check' of RAID5/RAID6 doesn't actually read any data since a
recent patch - so fix that (and mark for -stable)
- a couple of other minor bugs.
* tag 'md-3.4-fixes' of git://neil.brown.name/md:
md/raid1,raid10: don't compare excess byte during consistency check.
md/raid5: Fix a bug about judging if the operation is syncing or replacing
md/raid1:Remove unnecessary rcu_dereference(conf->mirrors[i].rdev).
md: Avoid OOPS when reshaping raid1 to raid0
md/raid5: fix handling of bad blocks during recovery.
md/raid1: If md_integrity_register() failed,run() must free the mem
md/raid0: If md_integrity_register() fails, raid0_run() must free the mem.
md/linear: If md_integrity_register() fails, linear_run() must free the mem.
Linus Torvalds [Wed, 4 Apr 2012 15:25:23 +0000 (08:25 -0700)]
Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM fixes from Russell King:
"Nothing too big here, just small fixes."
* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
ARM: fix more fallout from
9f97da78bf (Disintegrate asm/system.h for ARM)
ARM: fix bios32.c build warning
ARM: 7337/1: ptrace: fix ptrace_read_user for !CONFIG_MMU platforms
ARM: fix missing bug.h include in arch/arm/kernel/insn.c
ARM: sa11x0: fix build errors from DMA engine API updates
Linus Torvalds [Wed, 4 Apr 2012 15:24:21 +0000 (08:24 -0700)]
Merge git://git./linux/kernel/git/davem/sparc
Pull Sparc fixes from David Miller:
"One build regression and one serial probe regression fix on sparc."
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
serial/sunzilog: fix keyboard on SUN SPARCstation
sparc: pgtable_64: change include order
Paul Gortmaker [Tue, 3 Apr 2012 23:14:04 +0000 (19:14 -0400)]
avr32: fix nop compile fails from system.h split up
To fix:
In file included from kernel/exit.c:61:
arch/avr32/include/asm/mmu_context.h: In function 'enable_mmu':
arch/avr32/include/asm/mmu_context.h:135: error: implicit declaration of function 'nop'
It needs an include of the new file created in commit
ae4739465866
("Disintegrate asm/system.h for AVR32"), but since that file only
contains "nop", and since other arch already have precedent of putting
nop in asm/barrier.h we should just delete the new file and put nop in
barrier.h
Suggested-and-acked-by: David Howells <dhowells@redhat.com>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 4 Apr 2012 15:16:25 +0000 (08:16 -0700)]
Revert "nouveau/bios: Fix tracking of BIOS image data"
This reverts commit
d06221c0617ab6d0bc41c4980cefdd9c8cc9a1c1.
It turns out to trigger the "BUG_ON(!PageCompound(page))" in kfree(),
apparently because the code ends up trying to free somethng that was
never kmalloced in the first place.
BenH points out that the patch was untested and wasn't meant to go into
the upstream kernel that quickly in the first place.
Backtrace:
bios_shadow
bios_shadow_prom
nv_mask
init_io
bios_shadow
nouveau_bios_init
NVReadVgaCrtc
NVSetOwner
nouveau_card_init
nouveau_load
Reported-by: Meelis Roos <mroos@linux.ee>
Requested-by: Dave Airlie <airlied@gmail.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Borislav Petkov [Wed, 4 Apr 2012 12:21:02 +0000 (14:21 +0200)]
MCE, AMD: Drop too granulary family model checks
MCA details seldom change inbetween the models of a family so don't
be too conservative and enable decoding on everything starting from
K8 onwards. Minor adjustments can come in later but most importantly,
we have some decoding infrastructure in place for upcoming models by
default.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Sam Ravnborg [Wed, 4 Apr 2012 07:35:06 +0000 (09:35 +0200)]
serial/sunzilog: fix keyboard on SUN SPARCstation
The keyboard on my SUN SPARCstation 5 no longer worked.
The culprint was:
d4e33fac2408d37f7b52e80ca2a89f9fb482914f
("serial: Kill off NO_IRQ")
Fix up logic for no irq / irq so the keyboard works again.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Graeme Smecher [Tue, 3 Apr 2012 23:42:21 +0000 (19:42 -0400)]
hwmon: (ad7314) Adds missing spi_dev initialization
This driver was recently moved from IIO (where it worked) to hwmon (where
it doesn't.) This breakage occured because the hwmon version neglected to
correctly initialize a reference to spi_dev in its drvdata. The result is a
segfault every time the temperature is queried.
Signed-off-by: Graeme Smecher <gsmecher@threespeedlogic.com>
Cc: stable@vger.kernel.org # 3.2+
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Linus Torvalds [Tue, 3 Apr 2012 17:13:34 +0000 (10:13 -0700)]
Merge branch 'drm-fixes-intel' of git://people.freedesktop.org/~airlied/linux
Pull drm update from Dave Airlie:
"This pull just contains a forward of the Intel fixes from Daniel.
The only annoyance is the RC6 enable, which really should have made
-next, but since Ubuntu are shipping it I reckon its getting a good
testing now by the time 3.4 comes out.
The pull from Daniel contains his pull message to me:
"A few patches for 3.4, major part is 3 regression fixes:
- ppgtt broke hibernate on snb/ivb. Somehow our QA claims that it
still works, which is why this has not been caught earlier.
- ppgtt flails in combination with dmar. I kinda expected this one :(
- fence handling bugfix for gen2/3. Iirc this one is about a year
old, fix curtesy Chris Wilson. I've created an shockingly simple
i-g-t test to catch this in the future."
Wrt regressions I've just got a report that gmbus (newly enabled
again in 3.4) is a bit noisy. I'm looking into this atm.
Also included are the rc6 enable patches for snb from Eugeni. I
wanted to include these in the main 3.4 pull but screwed it up.
Please hit me. Imo these kind of patches really should go in
before -rc1, but in thise case rc6 has brought us tons of press and
guinea pigs^W^W testers and ubuntu is already running with it. So
I estimate a pretty small chance for this to blow up.
And some smaller things:
- two minor locking snafus
- server gt2 ivb pciid
- 2 patches to sanitize the register state left behind by the bios
some more
- 2 new quirk entries
- cs readback trick against missed IRQs from ivb also enabled on snb
- sprite fix from Jesse"
Let's see if the "enable RC6 on sandybridge" finally works and sticks.
I've been enabling it by hand (i915.i915_enable_rc6=1) for several
months on my Macbook Air, and it definitely makes a difference (and has
worked for me). But every time we enabled it before it showed some odd
hw buglet for *somebody*.
This time it's all good, I'm sure.
* 'drm-fixes-intel' of git://people.freedesktop.org/~airlied/linux:
drm/i915: treat src w & h as fixed point in sprite handling code
drm/i915: no-lvds quirk on MSI DC500
drm/i915: Add lock on drm_helper_resume_force_mode
drm/i915: don't leak struct_mutex lock on ppgtt init failures
drm/i915: disable ppgtt on snb when dmar is enabled
drm/i915: add Ivy Bridge GT2 Server entries
drm/i915: properly clear SSC1 bit in the pch refclock init code
drm/i915: apply CS reg readback trick against missed IRQ on snb
drm/i915: quirk away broken OpRegion VBT
drm/i915: enable plain RC6 on Sandy Bridge by default
drm/i915: allow to select rc6 modes via kernel parameter
drm/i915: Mark untiled BLT commands as fenced on gen2/3
drm/i915: properly restore the ppgtt page directory on resume
drm/i915: Sanitize BIOS debugging bits from PIPECONF
Linus Torvalds [Tue, 3 Apr 2012 17:12:21 +0000 (10:12 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
"Mainly nouveau fixes, one for a regressions in -rc1, fixes for booting
on a ppc G5, and a Kconfig fix. Two radeon fixes, one oops, one s/r
fix. One udl mmap fix. And one core drm fix to stop bad fbdev apps
overwriting bits of ram."
* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
drm: Validate requested virtual size against allocated fb size
drm/radeon: Don't dereference possibly-NULL pointer.
mm, drm/udl: fixup vma flags on mmap
drm/radeon/kms: fix fans after resume
nouveau/bios: Fix tracking of BIOS image data
nouveau: Fix crash when pci_ram_rom() returns a size of 0
drm/nouveau: select POWER_SUPPLY
drm/nouveau: inform userspace of relaxed kernel subchannel requirements
Revert "drm/nouveau: inform userspace of new kernel subchannel requirements"
drm/nouveau: oops, create m2mf for nvd9 too
Linus Torvalds [Tue, 3 Apr 2012 17:12:05 +0000 (10:12 -0700)]
Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze
Pull arch/microblaze fixes from Michal Simek.
* 'next' of git://git.monstr.eu/linux-2.6-microblaze:
microblaze: Fix ret_from_fork declaration
microblaze: Do not use tlb_skip in early_printk
microblaze: Add missing headers caused by disintegration asm/system.h
microblaze: Fix stack usage in PAGE_SIZE copy_tofrom_user
microblaze: Fix tlb_skip variable on noMMU system
microblaze: Fix __futex_atomic_op macro register usage
Linus Torvalds [Tue, 3 Apr 2012 17:07:13 +0000 (10:07 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/geert/linux-m68k
Pull m68k fixes from Geert Uytterhoeven:
"Here are a few fixes for the m68k architecture. Nothing fancy this
time, just a build fix for the asm/system.h disintegration, and two
fixes for missing platform checks (one got in during last merge
window), which can cause crashes in multi-platform kernels."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
m68k/q40: Add missing platform check before registering platform devices
m68k/mac: Add missing platform check before registering platform devices
m68k: include asm/cmpxchg.h in our m68k atomic.h
Linus Torvalds [Mon, 2 Apr 2012 22:48:12 +0000 (15:48 -0700)]
lsm_audit: don't specify the audit pre/post callbacks in 'struct common_audit_data'
It just bloats the audit data structure for no good reason, since the
only time those fields are filled are just before calling the
common_lsm_audit() function, which is also the only user of those
fields.
So just make them be the arguments to common_lsm_audit(), rather than
bloating that structure that is passed around everywhere, and is
initialized in hot paths.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Paris [Tue, 3 Apr 2012 16:38:00 +0000 (09:38 -0700)]
SELinux: do not allocate stack space for AVC data unless needed
Instead of declaring the entire selinux_audit_data on the stack when we
start an operation on declare it on the stack if we are going to use it.
We know it's usefulness at the end of the security decision and can declare
it there.
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Paris [Mon, 2 Apr 2012 17:15:55 +0000 (13:15 -0400)]
SELinux: remove avd from slow_avc_audit()
We don't use the argument, so remove it.
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Paris [Mon, 2 Apr 2012 17:15:50 +0000 (13:15 -0400)]
SELinux: remove avd from selinux_audit_data
We do not use it. Remove it.
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Paris [Mon, 2 Apr 2012 17:15:44 +0000 (13:15 -0400)]
LSM: shrink the common_audit_data data union
After shrinking the common_audit_data stack usage for private LSM data I'm
not going to shrink the data union. To do this I'm going to move anything
larger than 2 void * ptrs to it's own structure and require it to be declared
separately on the calling stack. Thus hot paths which don't need more than
a couple pointer don't have to declare space to hold large unneeded
structures. I could get this down to one void * by dealing with the key
struct and the struct path. We'll see if that is helpful after taking care of
networking.
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Paris [Tue, 3 Apr 2012 16:37:02 +0000 (09:37 -0700)]
LSM: shrink sizeof LSM specific portion of common_audit_data
Linus found that the gigantic size of the common audit data caused a big
perf hit on something as simple as running stat() in a loop. This patch
requires LSMs to declare the LSM specific portion separately rather than
doing it in a union. Thus each LSM can be responsible for shrinking their
portion and don't have to pay a penalty just because other LSMs have a
bigger space requirement.
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dave Airlie [Tue, 3 Apr 2012 15:00:23 +0000 (16:00 +0100)]
Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel into drm-intel-fixes
From Daniel Vetter:
"A few patches for 3.4, major part is 3 regression fixes:
- ppgtt broke hibernate on snb/ivb. Somehow our QA claims that it still
works, which is why this has not been caught earlier.
- ppgtt flails in combination with dmar. I kinda expected this one :(
- fence handling bugfix for gen2/3. Iirc this one is about a year old, fix
curtesy Chris Wilson. I've created an shockingly simple i-g-t test to
catch this in the future.
Wrt regressions I've just got a report that gmbus (newly enabled again in
3.4) is a bit noisy. I'm looking into this atm.
Also included are the rc6 enable patches for snb from Eugeni. I wanted to
include these in the main 3.4 pull but screwed it up. Please hit me. Imo
these kind of patches really should go in before -rc1, but in thise case
rc6 has brought us tons of press and guinea pigs^W^W testers and ubuntu is
already running with it. So I estimate a pretty small chance for this to
blow up.
And some smaller things:
- two minor locking snafus
- server gt2 ivb pciid
- 2 patches to sanitize the register state left behind by the bios some
more
- 2 new quirk entries
- cs readback trick against missed IRQs from ivb also enabled on snb
- sprite fix from Jesse"
* 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel:
drm/i915: treat src w & h as fixed point in sprite handling code
drm/i915: no-lvds quirk on MSI DC500
drm/i915: Add lock on drm_helper_resume_force_mode
drm/i915: don't leak struct_mutex lock on ppgtt init failures
drm/i915: disable ppgtt on snb when dmar is enabled
drm/i915: add Ivy Bridge GT2 Server entries
drm/i915: properly clear SSC1 bit in the pch refclock init code
drm/i915: apply CS reg readback trick against missed IRQ on snb
drm/i915: quirk away broken OpRegion VBT
drm/i915: enable plain RC6 on Sandy Bridge by default
drm/i915: allow to select rc6 modes via kernel parameter
drm/i915: Mark untiled BLT commands as fenced on gen2/3
drm/i915: properly restore the ppgtt page directory on resume
drm/i915: Sanitize BIOS debugging bits from PIPECONF
Chris Wilson [Mon, 26 Mar 2012 20:15:53 +0000 (21:15 +0100)]
drm: Validate requested virtual size against allocated fb size
mplayer -vo fbdev tries to create a screen that is twice as tall as the
allocated framebuffer for "doublebuffering". By default, and all in-tree
users, only sufficient memory is allocated and mapped to satisfy the
smallest framebuffer and the virtual size is no larger than the actual.
For these users, we should therefore reject any userspace request to
create a screen that requires a buffer larger than the framebuffer
originally allocated.
References: https://bugs.freedesktop.org/show_bug.cgi?id=38138
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
Jesse Barnes [Tue, 20 Mar 2012 17:59:09 +0000 (10:59 -0700)]
drm/i915: treat src w & h as fixed point in sprite handling code
This was missed when we converted the source values to 16.16 fixed point.
Cc: stable@vger.kernel.org
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Anisse Astier [Wed, 7 Mar 2012 17:36:35 +0000 (18:36 +0100)]
drm/i915: no-lvds quirk on MSI DC500
This hardware doesn't have an LVDS, it's a desktop box. Fix incorrect
LVDS detection.
Cc: stable@kernel.org
Signed-off-by: Anisse Astier <anisse@astier.eu>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Sean Paul [Fri, 23 Mar 2012 12:52:58 +0000 (08:52 -0400)]
drm/i915: Add lock on drm_helper_resume_force_mode
i915_drm_thaw was not locking the mode_config lock when calling
drm_helper_resume_force_mode. When there were multiple wake sources,
this caused FDI training failure on SNB which in turn corrupted the
display.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Mon, 2 Apr 2012 21:33:03 +0000 (23:33 +0200)]
drm/i915: don't leak struct_mutex lock on ppgtt init failures
Reported-by: Konstantin Belousov <kostikbel@gmail.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Peter Zijlstra [Tue, 27 Mar 2012 14:50:42 +0000 (16:50 +0200)]
perf/x86/p4: Add format attributes
Steven reported his P4 not booting properly, the missing format
attributes cause a NULL ptr deref. Cure this by adding the
missing format specification.
I took the format description out of the comment near
p4_config_pack*() and hope that comment is still relatively
accurate.
Reported-by: Steven Rostedt <rostedt@goodmis.org>
Reported-by: Bruno Prémont <bonbons@linux-vserver.org>
Tested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Lin Ming <ming.m.lin@intel.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1332859842.16159.227.camel@twins
Signed-off-by: Ingo Molnar <mingo@kernel.org>
NeilBrown [Sun, 1 Apr 2012 15:39:05 +0000 (01:39 +1000)]
md/raid1,raid10: don't compare excess byte during consistency check.
When comparing two pages read from different legs of a mirror, only
compare the bytes that were read, not the whole page.
In most cases we read a whole page, but in some cases with
bad blocks or odd sizes devices we might read fewer than that.
This bug has been present "forever" but at worst it might cause
a report of two many mismatches and generate a little bit
extra resync IO, so there is no need to back-port to -stable
kernels.
Reported-by: majianpeng <majianpeng@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
majianpeng [Sun, 1 Apr 2012 15:16:59 +0000 (01:16 +1000)]
md/raid5: Fix a bug about judging if the operation is syncing or replacing
When create a raid5 using assume-clean and echo check or repair to
sync_action.Then component disks did not operated IO but the raid
check/resync faster than normal.
Because the judgement in function analyse_stripe():
if (do_recovery ||
sh->sector >= conf->mddev->recovery_cp)
s->syncing = 1;
else
s->replacing = 1;
When check or repair,the recovery_cp == MaxSectore,so syncing equal zero
not one.
This bug was introduced by commit
9a3e1101b827
md/raid5: detect and handle replacements during recovery.
so this patch is suitable for 3.3-stable.
Cc: stable@vger.kernel.org
Signed-off-by: majianpeng <majianpeng@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
majianpeng [Sun, 1 Apr 2012 15:04:19 +0000 (01:04 +1000)]
md/raid1:Remove unnecessary rcu_dereference(conf->mirrors[i].rdev).
Because rde->nr_pending > 0,so can not remove this disk.
And in any case, we aren't holding rcu_read_lock()
Signed-off-by: majianpeng <majianpeng@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Jes Sorensen [Sun, 1 Apr 2012 13:48:38 +0000 (23:48 +1000)]
md: Avoid OOPS when reshaping raid1 to raid0
raid1 arrays do not have the notion of chunk size. Calculate the
largest chunk sector size we can use to avoid a divide by zero OOPS
when aligning the size of the new array to the chunk size.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
NeilBrown [Sun, 1 Apr 2012 13:48:38 +0000 (23:48 +1000)]
md/raid5: fix handling of bad blocks during recovery.
1/ We can only treat a known-bad-block like a read-error if we
have the data that belongs in that block. So fix that test.
2/ If we cannot recovery a stripe due to insufficient data,
don't tell "md_done_sync" that the sync failed unless we really
did fail something. If we successfully record bad blocks,
that is success.
Reported-by: "majianpeng" <majianpeng@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Linus Torvalds [Tue, 3 Apr 2012 00:58:04 +0000 (17:58 -0700)]
Merge branch 'drm-prime-dmabuf-initial' of git://people.freedesktop.org/~airlied/linux
Pull dma-buf prime support from Dave Airlie:
"This isn't a majorly urgent thing to have, but we'd like to set the
stage for working on dma-buf support in the drm drivers for the next
merge window, so I'd like to push in the initial submission now so
people have something that we can build on top of. The code just
introduces the user interface and internal helper functions for
drivers to use.
We have driver support under development for i915, nouveau, udl on x86
and exynos, omapdrm on arm, which we would be aiming for the next
merge window."
In the -rc1 announcement I asked for people who would use this to
comment on it, and got severa "Yes please" from people for this and for
HSI (that I merged earlier).
So far crickets on pohmelfs and the DMA-mapping infrastructure.
* 'drm-prime-dmabuf-initial' of git://people.freedesktop.org/~airlied/linux:
drm: base prime/dma-buf support (v5)
Linus Torvalds [Tue, 3 Apr 2012 00:53:39 +0000 (17:53 -0700)]
Merge git://git./linux/kernel/git/davem/net
Pull networking fixes from David Miller:
1) Provide device string properly for USB i2400m wimax devices, also
don't OOPS when providing firmware string. From Phil Sutter.
2) Add support for sh_eth SH7734 chips, from Nobuhiro Iwamatsu.
3) Add another device ID to USB zaurus driver, from Guan Xin.
4) Loop index start in pool vector iterator is wrong causing MAC to not
get configured in bnx2x driver, fix from Dmitry Kravkov.
5) EQL driver assumes HZ=100, fix from Eric Dumazet.
6) Now that skb_add_rx_frag() can specify the truesize increment
separately, do so in f_phonet and cdc_phonet, also from Eric
Dumazet.
7) virtio_net accidently uses net_ratelimit() not only on the kernel
warning but also the statistic bump, fix from Rick Jones.
8) ip_route_input_mc() uses fixed init_net namespace, oops, use
dev_net(dev) instead. Fix from Benjamin LaHaise.
9) dev_forward_skb() needs to clear the incoming interface index of the
SKB so that it looks like a new incoming packet, also from Benjamin
LaHaise.
10) iwlwifi mistakenly initializes a channel entry as 2GHZ instead of
5GHZ, fix from Stanislav Yakovlev.
11) Missing kmalloc() return value checks in orinoco, from Santosh
Nayak.
12) ath9k doesn't check for HT capabilities in the right way, it is
checking ht_supported instead of the ATH9K_HW_CAP_HT flag. Fix from
Sujith Manoharan.
13) Fix x86 BPF JIT emission of 16-bit immediate field of AND
instructions, from Feiran Zhuang.
14) Avoid infinite loop in GARP code when registering sysfs entries.
From David Ward.
15) rose protocol uses memcpy instead of memcmp in a device address
comparison, oops. Fix from Daniel Borkmann.
16) Fix build of lpc_eth due to dev_hw_addr_rancom() interface being
renamed to eth_hw_addr_random(). From Roland Stigge.
17) Make ipv6 RTM_GETROUTE interpret RTA_IIF attribute the same way
that ipv4 does. Fix from Shmulik Ladkani.
18) via-rhine has an inverted bit test, causing suspend/resume
regressions. Fix from Andreas Mohr.
19) RIONET assumes 4K page size, fix from Akinobu Mita.
20) Initialization of imask register in sky2 is buggy, because bits are
"or'd" into an uninitialized local variable. Fix from Lino
Sanfilippo.
21) Fix FCOE checksum offload handling, from Yi Zou.
22) Fix VLAN processing regression in e1000, from Jiri Pirko.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (52 commits)
sky2: dont overwrite settings for PHY Quick link
tg3: Fix 5717 serdes powerdown problem
net: usb: cdc_eem: fix mtu
net: sh_eth: fix endian check for architecture independent
usb/rtl8150 : Remove duplicated definitions
rionet: fix page allocation order of rionet_active
via-rhine: fix wait-bit inversion.
ipv6: Fix RTM_GETROUTE's interpretation of RTA_IIF to be consistent with ipv4
net: lpc_eth: Fix rename of dev_hw_addr_random
net/netfilter/nfnetlink_acct.c: use linux/atomic.h
rose_dev: fix memcpy-bug in rose_set_mac_address
Fix non TBI PHY access; a bad merge undid bug fix in a previous commit.
net/garp: avoid infinite loop if attribute already exists
x86 bpf_jit: fix a bug in emitting the 16-bit immediate operand of AND
bonding: emit event when bonding changes MAC
mac80211: fix oper channel timestamp updation
ath9k: Use HW HT capabilites properly
MAINTAINERS: adding maintainer for ipw2x00
net: orinoco: add error handling for failed kmalloc().
net/wireless: ipw2x00: fix a typo in wiphy struct initilization
...
Lino Sanfilippo [Fri, 30 Mar 2012 07:28:59 +0000 (07:28 +0000)]
sky2: dont overwrite settings for PHY Quick link
This patch corrects a bug in function sky2_open() of the Marvell Yukon 2 driver
in which the settings for PHY quick link are overwritten.
Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Acked-by: Stephen Hemminger <shemminger@vyattta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Mon, 2 Apr 2012 21:41:43 +0000 (14:41 -0700)]
Merge branch 'paul' (Fixups from Paul Gortmaker)
This merges some of the fixes from Paul Gortmaker for the header file
cleanup fallout.
Some of the patches are going through arch maintainer trees, and David
Howells suggested another be done differently, but this at least fixes a
few cases.
* emailed from Paul Gortmaker <paul.gortmaker@windriver.com>:
asm-generic: add linux/types.h to cmpxchg.h
firewire: restore the device.h include in linux/firewire.h
frv: fix warnings in mb93090-mb00/pci-dma.c about implicit EXPORT_SYMBOL
parisc: fix missing cmpxchg file error from system.h split
blackfin: fix cmpxchg build fails from system.h fallout
avr32: fix build failures from mis-naming of atmel_nand.h
ARM: mach-msm: fix compile fail from system.h fallout
irq_work: fix compile failure on MIPS from system.h split
Matt Carlson [Mon, 2 Apr 2012 09:01:40 +0000 (09:01 +0000)]
tg3: Fix 5717 serdes powerdown problem
If port 0 of a 5717 serdes device powers down, it hides the phy from
port 1. This patch works around the problem by keeping port 0's phy
powered up.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Paul Gortmaker [Sun, 1 Apr 2012 20:38:47 +0000 (16:38 -0400)]
asm-generic: add linux/types.h to cmpxchg.h
Builds of the openrisc or1ksim_defconfig show the following:
In file included from arch/openrisc/include/generated/asm/cmpxchg.h:1:0,
from include/asm-generic/atomic.h:18,
from arch/openrisc/include/generated/asm/atomic.h:1,
from include/linux/atomic.h:4,
from include/linux/dcache.h:4,
from fs/notify/fsnotify.c:19:
include/asm-generic/cmpxchg.h: In function '__xchg':
include/asm-generic/cmpxchg.h:34:20: error: expected ')' before 'u8'
include/asm-generic/cmpxchg.h:34:20: warning: type defaults to 'int' in type name
and many more lines of similar errors. It seems specific to the or32
because most other platforms have an arch specific component that would
have already included types.h ahead of time, but the o32 does not.
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Jonas Bonn <jonas@southpole.se>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: David Howells <dhowells@redhat.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Paul Gortmaker [Sun, 1 Apr 2012 20:38:45 +0000 (16:38 -0400)]
firewire: restore the device.h include in linux/firewire.h
Commit
313162d0b838 ("device.h: audit and cleanup users in main include
dir") exchanged an include <linux/device.h> for a struct *device but in
actuality I misread this file when creating 313162d and it should have
remained an include.
There were no build regressions since all consumers were already getting
device.h anyway, but make it right regardless.
Reported-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Paul Gortmaker [Sun, 1 Apr 2012 20:38:44 +0000 (16:38 -0400)]
frv: fix warnings in mb93090-mb00/pci-dma.c about implicit EXPORT_SYMBOL
To fix:
arch/frv/mb93090-mb00/pci-dma.c:31:1: warning: data definition has no type or storage class [enabled by default]
arch/frv/mb93090-mb00/pci-dma.c:31:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int]
arch/frv/mb93090-mb00/pci-dma.c:31:1: warning: parameter names (without types) in function declaration [enabled by default]
arch/frv/mb93090-mb00/pci-dma.c:38:1: warning: data definition has no type or storage class [enabled by default]
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Paul Gortmaker [Sun, 1 Apr 2012 20:38:42 +0000 (16:38 -0400)]
parisc: fix missing cmpxchg file error from system.h split
Commit
b4816afa3986 ("Move the asm-generic/system.h xchg()
implementation to asm-generic/cmpxchg.h") introduced the concept of
asm/cmpxchg.h but the parisc arch never got one. Fork the cmpxchg
content out of the asm/atomic.h file to create one.
Some minor whitespace fixups were done on the block of code that created
the new file.
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Paul Gortmaker [Sun, 1 Apr 2012 20:38:41 +0000 (16:38 -0400)]
blackfin: fix cmpxchg build fails from system.h fallout
Commit
3bed8d67469c ("Disintegrate asm/system.h for Blackfin [ver #2]")
introduced arch/blackfin/include/asm/cmpxchg.h but has it also including
the asm-generic one which causes this:
CC arch/blackfin/kernel/asm-offsets.s
In file included from arch/blackfin/include/asm/cmpxchg.h:125:0,
from arch/blackfin/include/asm/atomic.h:10,
from include/linux/atomic.h:4,
from include/linux/spinlock.h:384,
from include/linux/seqlock.h:29,
from include/linux/time.h:8,
from include/linux/timex.h:56,
from include/linux/sched.h:57,
from arch/blackfin/kernel/asm-offsets.c:10:
include/asm-generic/cmpxchg.h:24:15: error: redefinition of '__xchg'
arch/blackfin/include/asm/cmpxchg.h:82:29: note: previous definition of '__xchg' was here
make[2]: *** [arch/blackfin/kernel/asm-offsets.s] Error 1
It really only needs two simple defines from asm-generic, so just use
those instead.
Cc: Bob Liu <lliubbo@gmail.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Paul Gortmaker [Sun, 1 Apr 2012 20:38:40 +0000 (16:38 -0400)]
avr32: fix build failures from mis-naming of atmel_nand.h
Commit
bf4289cba02b ("ATMEL: fix nand ecc support") indicated that it
wanted to "Move platform data to a common header
include/linux/platform_data/atmel_nand.h" and the new header even had
re-include protectors with:
#ifndef __ATMEL_NAND_H__
However, the file that was added was simply called atmel.h
and this caused avr32 defconfig to fail with:
In file included from arch/avr32/boards/atstk1000/setup.c:22:
arch/avr32/mach-at32ap/include/mach/board.h:10:44: error: linux/platform_data/atmel_nand.h: No such file or directory
In file included from arch/avr32/boards/atstk1000/setup.c:22:
arch/avr32/mach-at32ap/include/mach/board.h:121: warning: 'struct atmel_nand_data' declared inside parameter list
arch/avr32/mach-at32ap/include/mach/board.h:121: warning: its scope is only this definition or declaration, which is probably not what you want
make[2]: *** [arch/avr32/boards/atstk1000/setup.o] Error 1
It seems the scope of the file contents will expand beyond
just nand, so ignore the original intention, and fix up the
users who reference the bad name with the _nand suffix.
CC: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
CC: David Woodhouse <dwmw2@infradead.org>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Paul Gortmaker [Sun, 1 Apr 2012 20:38:38 +0000 (16:38 -0400)]
ARM: mach-msm: fix compile fail from system.h fallout
To fix:
In file included from arm/boot/compressed/misc.c:28:0:
arm/mach-msm/include/mach/uncompress.h: In function 'putc':
arch/arm/mach-msm/include/mach/uncompress.h:48:3: error: implicit
declaration of function 'smp_mb' [-Werror=implicit-function-declaration]
The putc does a cpu_relax which for this platform is smp_mb.
Bisect indicates the 1st failing commit as:
0195c00244dc ("Merge tag
'split-asm_system_h...")
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: David Howells <dhowells@redhat.com>
Acked-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Mon, 2 Apr 2012 16:50:40 +0000 (09:50 -0700)]
Merge branch 'for-next' of git://gitorious.org/kernel-hsi/kernel-hsi
Pull HSI (High Speed Synchronous Serial Interface) framework from Carlos Chinea:
"The High Speed Synchronous Serial Interface (HSI) is a serial
interface mainly used for connecting application engines (APE) with
cellular modem engines (CMT) in cellular handsets.
The framework is currently being used for some people and we would
like to see it integrated into the kernel for 3.3. There is no HW
controller drivers in this pull, but some people have already some of
them pending which they would like to push as soon as this integrated.
I am also working on the acceptance for an TI OMAP one, based on a
compatible legacy version of the interface called SSI."
Ok, so it didn't get into 3.3, but here it is pulled into 3.4.
Several people piped up to say "yeah, we want this".
* 'for-next' of git://gitorious.org/kernel-hsi/kernel-hsi:
HSI: hsi_char: Update ioctl-number.txt
HSI: Add HSI API documentation
HSI: hsi_char: Add HSI char device kernel configuration
HSI: hsi_char: Add HSI char device driver
HSI: hsi: Introducing HSI framework
Linus Torvalds [Mon, 2 Apr 2012 16:42:55 +0000 (09:42 -0700)]
Merge branch 'rc-fixes' of git://git./linux/kernel/git/mmarek/kbuild
Pull 'make cscope' fix from Michal Marek:
"The kbuild.git#misc pull request introduced a bug that broke make
cscope. Apparently, both the original author and me only tested the
use case that the commit was supposed to improve (make tags/TAGS), and
not the use case that was not supposed (make cscope)."
* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
tags.sh: Add missing quotes
Linus Torvalds [Mon, 2 Apr 2012 16:40:24 +0000 (09:40 -0700)]
Merge git://git./linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu:
- Fix for CPU hotplug hang in padata.
- Avoid using cpu_active inappropriately in pcrypt and padata.
- Fix for user-space algorithm lookup hang with IV generators.
- Fix for netlink dump of algorithms where stuff went missing due to
incorrect calculation of message size.
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: user - Fix size of netlink dump message
crypto: user - Fix lookup of algorithms with IV generator
crypto: pcrypt - Use the online cpumask as the default
padata: Fix cpu hotplug
padata: Use the online cpumask as the default
padata: Add a reference to the api documentation
Linus Torvalds [Mon, 2 Apr 2012 16:38:51 +0000 (09:38 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc
Pull powerpc fixes from Benjamin Herrenschmidt:
"This contains a couple more fixes for the system.h disintegration, a
trivial section mismatch fix, a couple of patches from akpm that I
didn't quite get he expected me to pickup, and a few more trivialities
form Kumar that he appear to have forgotten to send me in the previous
batch."
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc/eeh: Fix use of set_current_state() in eeh event handling set_current_state() wart
powerpc/eeh: Remove eeh_event_handler()->daemonize()
powerpc/kvm: Fallout from system.h disintegration
powerpc: Fix fallout from system.h split up
powerpc: Mark const init data with __initconst instead of __initdata
powerpc/qe: Update the SNUM table for MPC8569 Rev2.0
powerpc/dts: Removed fsl,msi property from dts.
powerpc/epapr: add "memory" as a clobber to all hypercalls
powerpc/85xx: Enable I2C_CHARDEV and I2C_MPC options in defconfigs
powerpc/85xx: add the P1020UTM-PC DTS support
powerpc/85xx: add the P1020MBG-PC DTS support
powerpc/8xxx: remove 85xx/86xx restrictions from fsl_guts.h
Linus Torvalds [Mon, 2 Apr 2012 15:53:24 +0000 (08:53 -0700)]
Merge tag 'for-linus' of git://github.com/rustyrussell/linux
Pull cpumask cleanups from Rusty Russell:
"(Somehow forgot to send this out; it's been sitting in linux-next, and
if you don't want it, it can sit there another cycle)"
I'm a sucker for things that actually delete lines of code.
Fix up trivial conflict in arch/arm/kernel/kprobes.c, where Rusty fixed
a user of &cpu_online_map to be cpu_online_mask, but that code got
deleted by commit
b21d55e98ac2 ("ARM: 7332/1: extract out code patch
function from kprobes").
* tag 'for-linus' of git://github.com/rustyrussell/linux:
cpumask: remove old cpu_*_map.
documentation: remove references to cpu_*_map.
drivers/cpufreq/db8500-cpufreq: remove references to cpu_*_map.
remove references to cpu_*_map in arch/
Paul Gortmaker [Sun, 1 Apr 2012 20:38:37 +0000 (16:38 -0400)]
irq_work: fix compile failure on MIPS from system.h split
Builds of the MIPS platform ip32_defconfig fails as of commit
0195c00244dc ("Merge tag 'split-asm_system_h ...") because MIPS xchg()
macro uses BUILD_BUG_ON and it was moved in commit
b81947c646bf
("Disintegrate asm/system.h for MIPS").
The root cause is that the system.h split wasn't tested on a baseline
with commit
6c03438edeb5 ("kernel.h: doesn't explicitly use bug.h, so
don't include it.")
Since this file uses BUG code in several other places besides the xchg
call, simply make the inclusion explicit.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Daniel Vetter [Mon, 2 Apr 2012 08:08:35 +0000 (10:08 +0200)]
drm/i915: disable ppgtt on snb when dmar is enabled
Totally unexpected that this regressed. Luckily it sounds like we just
need to have dmar disable on the igfx, not the entire system. At least
that's what a few days of testing between Tony Vroon and me indicates.
Reported-by: Tony Vroon <tony@linx.net>
Cc: Tony Vroon <tony@linx.net>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43024
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Eugeni Dodonov [Thu, 29 Mar 2012 23:55:48 +0000 (20:55 -0300)]
drm/i915: add Ivy Bridge GT2 Server entries
This adds PCI ID for IVB GT2 server variant which we were missing.
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
[danvet: fix up conflict because the patch has been diffed against next. tsk.]
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Marcelo Tosatti [Sun, 1 Apr 2012 16:53:36 +0000 (13:53 -0300)]
x86, kvm: Call restore_sched_clock_state() only after %gs is initialized
s2ram broke due to this KVM commit:
b74f05d61b73 x86: kvmclock: abstract save/restore sched_clock_state
restore_sched_clock_state() methods use percpu data, therefore
they must run after %gs is initialized, but before mtrr_bp_restore()
(due to lockstat using sched_clock).
Move it to the correct place.
Reported-and-tested-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Avi Kivity <avi@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Michal Simek [Mon, 2 Apr 2012 10:55:47 +0000 (12:55 +0200)]
microblaze: Fix ret_from_fork declaration
ret_from_fork is used by noMMU system too.
It should be the part of patch
"Disintegrate asm/system.h for Microblaze"
(sha1:
c40d04df152a1111c5bbcb632278394dabd2b73d)
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Mon, 2 Apr 2012 10:50:54 +0000 (12:50 +0200)]
microblaze: Do not use tlb_skip in early_printk
tlb_skip is valid only for MMU system.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michel Dänzer [Thu, 29 Mar 2012 14:47:43 +0000 (16:47 +0200)]
drm/radeon: Don't dereference possibly-NULL pointer.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Konstantin Khlebnikov [Sat, 31 Mar 2012 09:29:25 +0000 (13:29 +0400)]
mm, drm/udl: fixup vma flags on mmap
There should be VM_MIXEDMAP, not VM_PFNMAP, because udl_gem_fault() inserts
pages via vm_insert_page(). Other drm/gem drivers already do this.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Dave Airlie <airlied@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Thu, 29 Mar 2012 23:04:08 +0000 (19:04 -0400)]
drm/radeon/kms: fix fans after resume
On pre-R600 asics, the SpeedFanControl table is not
executed as part of ASIC_Init as it is on newer asics.
Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=29412
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
Benjamin Herrenschmidt [Mon, 2 Apr 2012 03:38:19 +0000 (13:38 +1000)]
nouveau/bios: Fix tracking of BIOS image data
The code tries various methods for retreiving the BIOS data. However
it doesn't clear the bios->data pointer between the iterations.
In some cases, the shadow() method will fail and not update bios->data
at all, which will cause us to "score" the old data and incorrectly
attribute that score to the new method. This can cause double frees
later when disposing of the unused data.
Additionally, we were not freeing the data for methods that fail the
score test (we only freed when a "best" is superseeded, not when the
new method has a lower score than the exising "best"). Fix that as well.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Benjamin Herrenschmidt [Mon, 2 Apr 2012 03:37:13 +0000 (13:37 +1000)]
nouveau: Fix crash when pci_ram_rom() returns a size of 0
From
b15b244d6e6e20964bd4b85306722cb60c3c0809 Mon Sep 17 00:00:00 2001
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: Mon, 2 Apr 2012 13:28:18 +1000
Subject:
Under some circumstances, pci_map_rom() can return a valid mapping
but a size of 0 (if it cannot find an image in the header).
This causes nouveau to try to kmalloc() a 0 sized pointer and
dereference it, which crashes.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Mon, 2 Apr 2012 09:45:49 +0000 (10:45 +0100)]
drm/nouveau: select POWER_SUPPLY
Ben H. reported that building nouveau into the kernel and power supply
as a module was broken.
Just have nouveau select it, like radeon does.
Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Mon, 2 Apr 2012 09:45:03 +0000 (10:45 +0100)]
Merge branch 'drm-nouveau-fixes' of git://git.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes
* 'drm-nouveau-fixes' of git://git.freedesktop.org/git/nouveau/linux-2.6:
drm/nouveau: inform userspace of relaxed kernel subchannel requirements
Revert "drm/nouveau: inform userspace of new kernel subchannel requirements"
drm/nouveau: oops, create m2mf for nvd9 too
Stephen Boyd [Sun, 1 Apr 2012 06:41:07 +0000 (23:41 -0700)]
Subject: [PATCH] tags.sh: Add missing quotes
When $remove_structs is empty a test for empty string will turn
into test -n with no arguments meaning true. Add quotes so an
empty string is tested and so that make cscope works again.
Reported-and-tested-by: Jike Song <albcamus@gmail.com>
Reported-by: Prarit Bhargava <prarit@redhat.com>
Acked-by: Yang Bai <hamo.by@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Andrew Morton [Wed, 28 Mar 2012 12:20:58 +0000 (12:20 +0000)]
powerpc/eeh: Fix use of set_current_state() in eeh event handling set_current_state() wart
That set_current_state() won't work very well: the subsequent mutex_lock()
might flip the task back into TASK_RUNNING.
Attempt to put it somewhere where it might have been meant to be, and
attempt to describe why it might have been added.
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Oleg Nesterov [Wed, 28 Mar 2012 12:20:57 +0000 (12:20 +0000)]
powerpc/eeh: Remove eeh_event_handler()->daemonize()
daemonize() is only needed when a user-space task does kernel_thread().
eeh_event_handler() thread is created by the worker kthread, and thus it
doesn't need the soon-to-be-deprecated daemonize().
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Linas Vepstas <linasvepstas@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Benjamin Herrenschmidt [Sun, 1 Apr 2012 17:35:53 +0000 (17:35 +0000)]
powerpc/kvm: Fallout from system.h disintegration
Add a missing include to fix build
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Stephen Rothwell [Fri, 30 Mar 2012 14:01:07 +0000 (14:01 +0000)]
powerpc: Fix fallout from system.h split up
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Uwe Kleine-König [Fri, 30 Mar 2012 10:05:00 +0000 (10:05 +0000)]
powerpc: Mark const init data with __initconst instead of __initdata
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with
error: $variablename causes a section type conflict
because a section containing const variables is marked read only and so
cannot contain non-const variables.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Josh Boyer <jwboyer@gmail.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: cbe-oss-dev@lists.ozlabs.org
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Benjamin Herrenschmidt [Mon, 2 Apr 2012 03:57:46 +0000 (13:57 +1000)]
Merge remote-tracking branch 'kumar/next' into merge
Rabin Vincent [Thu, 29 Mar 2012 07:15:15 +0000 (07:15 +0000)]
net: usb: cdc_eem: fix mtu
Make CDC EEM recalculate the hard_mtu after adjusting the
hard_header_len.
Without this, usbnet adjusts the MTU down to 1494 bytes, and the host is
unable to receive standard 1500-byte frames from the device.
Tested with the Linux USB Ethernet gadget.
Cc: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yoshihiro Shimoda [Thu, 29 Mar 2012 19:32:08 +0000 (19:32 +0000)]
net: sh_eth: fix endian check for architecture independent
SuperH has the "CONFIG_CPU_LITTLE_ENDIAN" and the "__LITTLE_ENDIAN__".
But, other architecture doesn't have them. So, this patch fixes it.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
huajun li [Fri, 30 Mar 2012 00:11:05 +0000 (00:11 +0000)]
usb/rtl8150 : Remove duplicated definitions
There exist duplicated macro definitions in rtl8150.c, remove them.
Signed-off-by: Huajun Li <huajun.li.lee@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Akinobu Mita [Fri, 30 Mar 2012 01:01:46 +0000 (01:01 +0000)]
rionet: fix page allocation order of rionet_active
rionet_active is allocated from the page allocator and the allocation
order is calculated on the assumption that the page size is 4KB, so it
wastes memory on more than 4K page systems.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Andreas Mohr [Sun, 1 Apr 2012 12:35:00 +0000 (12:35 +0000)]
via-rhine: fix wait-bit inversion.
Bug appeared in
a384a33bb1c9ec2d99db2046b41f57023fa7d77b
("via-rhine: RHINE_WAIT_FOR macro removal). It can be noticed
during suspend/resume.
Signed-off-by: Andreas Mohr <andi@lisas.de>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: David Lv <DavidLv@viatech.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
majianpeng [Sun, 1 Apr 2012 23:48:38 +0000 (09:48 +1000)]
md/raid1: If md_integrity_register() failed,run() must free the mem
Signed-off-by: majianpeng <majianpeng@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
majianpeng [Sun, 1 Apr 2012 23:48:37 +0000 (09:48 +1000)]
md/raid0: If md_integrity_register() fails, raid0_run() must free the mem.
Signed-off-by: majianpeng <majianpeng@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
majianpeng [Sun, 1 Apr 2012 23:48:37 +0000 (09:48 +1000)]
md/linear: If md_integrity_register() fails, linear_run() must free the mem.
Signed-off-by: majianpeng <majianpeng@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Shmulik Ladkani [Sun, 1 Apr 2012 04:03:45 +0000 (04:03 +0000)]
ipv6: Fix RTM_GETROUTE's interpretation of RTA_IIF to be consistent with ipv4
In IPv4, if an RTA_IIF attribute is specified within an RTM_GETROUTE
message, then a route is searched as if a packet was received on the
specified 'iif' interface.
However in IPv6, RTA_IIF is not interpreted in the same way:
'inet6_rtm_getroute()' always calls 'ip6_route_output()', regardless the
RTA_IIF attribute.
As a result, in IPv6 there's no way to use RTM_GETROUTE in order to look
for a route as if a packet was received on a specific interface.
Fix 'inet6_rtm_getroute()' so that RTA_IIF is interpreted as "lookup a
route as if a packet was received on the specified interface", similar
to IPv4's 'inet_rtm_getroute()' interpretation.
Reported-by: Ami Koren <amikoren@yahoo.com>
Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Aaro Koskinen [Sun, 1 Apr 2012 08:54:38 +0000 (08:54 +0000)]
sparc: pgtable_64: change include order
Fix the following build breakage in v3.4-rc1:
CC arch/sparc/kernel/cpu.o
In file included from /home/aaro/git/linux/arch/sparc/include/asm/pgtable_64.h:15:0,
from /home/aaro/git/linux/arch/sparc/include/asm/pgtable.h:4,
from arch/sparc/kernel/cpu.c:15:
include/asm-generic/pgtable-nopud.h:13:16: error: unknown type name 'pgd_t'
include/asm-generic/pgtable-nopud.h:25:28: error: unknown type name 'pgd_t'
include/asm-generic/pgtable-nopud.h:26:27: error: unknown type name 'pgd_t'
include/asm-generic/pgtable-nopud.h:27:31: error: unknown type name 'pgd_t'
include/asm-generic/pgtable-nopud.h:28:30: error: unknown type name 'pgd_t'
include/asm-generic/pgtable-nopud.h:38:34: error: unknown type name 'pgd_t'
In file included from /home/aaro/git/linux/arch/sparc/include/asm/pgtable_64.h:783:0,
from /home/aaro/git/linux/arch/sparc/include/asm/pgtable.h:4,
from arch/sparc/kernel/cpu.c:15:
include/asm-generic/pgtable.h: In function 'pgd_none_or_clear_bad':
include/asm-generic/pgtable.h:258:2: error: implicit declaration of function 'pgd_none' [-Werror=implicit-function-declaration]
include/asm-generic/pgtable.h:260:2: error: implicit declaration of function 'pgd_bad' [-Werror=implicit-function-declaration]
include/asm-generic/pgtable.h: In function 'pud_none_or_clear_bad':
include/asm-generic/pgtable.h:269:6: error: request for member 'pgd' in something not a structure or union
Reported-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Geert Uytterhoeven [Sun, 18 Mar 2012 12:20:27 +0000 (13:20 +0100)]
m68k/q40: Add missing platform check before registering platform devices
On multi-platform kernels, the Q40/Q60 platform devices should be
registered when running on Q40/Q60 only. Else it may crash later.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Geert Uytterhoeven [Sun, 18 Mar 2012 12:21:38 +0000 (13:21 +0100)]
m68k/mac: Add missing platform check before registering platform devices
On multi-platform kernels, the Mac platform devices should be registered
when running on Mac only. Else it may crash later.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: stable@vger.kernel.org
Greg Ungerer [Fri, 30 Mar 2012 05:52:09 +0000 (15:52 +1000)]
m68k: include asm/cmpxchg.h in our m68k atomic.h
After commit
9ffc93f203c18a70623f21950f1dd473c9ec48cd ("Remove all
CC init/main.o
In file included from include/linux/mm.h:15:0,
from include/linux/ring_buffer.h:5,
from include/linux/ftrace_event.h:4,
from include/trace/syscall.h:6,
from include/linux/syscalls.h:78,
from init/main.c:16:
include/linux/debug_locks.h: In function ‘__debug_locks_off’:
include/linux/debug_locks.h:16:2: error: implicit declaration of function ‘xchg’
There is no indirect inclusions of the new asm/cmpxchg.h for m68k here.
Looking at most other architectures they include asm/cmpxchg.h in their
asm/atomic.h. M68k currently does not do this. Including this in atomic.h
fixes all m68k build problems.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
stigge@antcom.de [Wed, 28 Mar 2012 12:36:26 +0000 (12:36 +0000)]
net: lpc_eth: Fix rename of dev_hw_addr_random
In parallel to the integration of lpc_eth.c, dev_hw_addr_random() has been
renamed to eth_hw_addr_random(). This patch fixes it also in the new driver
lpc_eth.c.
Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: David S. Miller <davem@davemloft.net>