Don Zickus [Fri, 12 Aug 2011 17:54:51 +0000 (10:54 -0700)]
pstore: change mutex locking to spin_locks
pstore was using mutex locking to protect read/write access to the
backend plug-ins. This causes problems when pstore is executed in
an NMI context through panic() -> kmsg_dump().
This patch changes the mutex to a spin_lock_irqsave then also checks to
see if we are in an NMI context. If we are in an NMI and can't get the
lock, just print a message stating that and blow by the locking.
All this is probably a hack around the bigger locking problem but it
solves my current situation of trying to sleep in an NMI context.
Tested by loading the lkdtm module and executing a HARDLOCKUP which
will cause the machine to panic inside the nmi handler.
Signed-off-by: Don Zickus <dzickus@redhat.com> Acked-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Luck, Tony [Thu, 11 Aug 2011 22:14:39 +0000 (15:14 -0700)]
pstore: defer inserting OOPS entries into pstore
Life is simple for all the kernel terminating types of kmsg_dump
call backs - pstore just saves the tail end of the console log. But
for "oops" the situation is more complex - the kernel may carry on
running (possibly for ever). So we'd like to make the logged copy
of the oops appear in the pstore filesystem - so that the user has
a handle to clear the entry from the persistent backing store (if
we don't, the store may fill with "oops" entries (that are also
safely stashed in /var/log/messages) leaving no space for real
errors.
Current code calls pstore_mkfile() immediately. But this may
not be safe. The oops could have happened with arbitrary locks
held, or in interrupt or NMI context. So allocating memory and
calling into generic filesystem code seems unwise.
This patch defers making the entry appear. At the time
of the oops, we merely set a flag "pstore_new_entry" noting that
a new entry has been added. A periodic timer checks once a minute
to see if the flag is set - if so, it schedules a work queue to
rescan the backing store and make all new entries appear in the
pstore filesystem.
Bernd Schubert [Tue, 16 Aug 2011 10:56:54 +0000 (10:56 +0000)]
IPoIB: Fix possible NULL dereference in ipoib_start_xmit()
Fix a bug introduced in 69cce1d14049 ("net: Abstract dst->neighbour
accesses behind helpers.") where we might dereference skb_dst(skb)
even if it is NULL, which causes:
Finn Thain [Mon, 18 Jul 2011 09:44:17 +0000 (19:44 +1000)]
m68k/mac: Fix mac_irq_pending() for PSC MACE and SCC
Add missing return statement. The docs say that the level 4 PSC IRQs
relate to MACE DMA and SCC. Since those drivers don't call
mac_irq_pending() this patch has no affect. But it should be fixed all the
same, since it can be useful for MACE debugging.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Finn Thain [Sun, 17 Jul 2011 14:06:10 +0000 (00:06 +1000)]
m68k/mac: Fix compiler warning in via_read_time()
The algorithm described in the comment compares two reads from the RTC but
the code actually reads once and compares the result to an uninitialized
value. This causes the compiler to warn, "last_result maybe used
uninitialized". Make the code match the comment, fix the warning and
perhaps improve reliability. Tested on a Quadra 700.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Randy Dunlap [Tue, 16 Aug 2011 04:41:43 +0000 (21:41 -0700)]
xen: self-balloon needs module.h
Fix build errors (found when CONFIG_SYSFS is not enabled):
drivers/xen/xen-selfballoon.c:446: warning: data definition has no type or storage class
drivers/xen/xen-selfballoon.c:446: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'
drivers/xen/xen-selfballoon.c:446: warning: parameter names (without types) in function declaration
drivers/xen/xen-selfballoon.c:485: error: expected declaration specifiers or '...' before string constant
drivers/xen/xen-selfballoon.c:485: warning: data definition has no type or storage class
drivers/xen/xen-selfballoon.c:485: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
drivers/xen/xen-selfballoon.c:485: warning: function declaration isn't a prototype
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Alan Cox [Tue, 16 Aug 2011 13:18:48 +0000 (14:18 +0100)]
gma500: kill MIPI interface types
Kirill Shutemov found problems with the non-upstream IMG driver where the
use of extra DRM encoder/connector types caused random crashes when the DRM
layer tried to display their matching name. This removes the MIPI types
matching the changes Pauli Nieminen made to the non upstream driver set.
As Pauli points out:
" MIPI (or DSI) is protocol specification on top of LVDS serial bus. That
makes it resonable to call MIPI connectors and encoders LVDS."
(and indeed they may also be HDMI convertors or similar when we want to
report a more useful to end user result)
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Sebastian Ott [Tue, 16 Aug 2011 14:04:24 +0000 (16:04 +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>
x = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
when != if (...) { <+...kfree(x)...+> }
when any
when != true x == NULL
x->fl
...>
(
if (x == NULL) S1
|
if (...) { ... when != x
when forall
(
return \(0\|<+...x...+>\|ptr\);
|
* return ...;
)
}
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Heiko Carstens [Tue, 16 Aug 2011 14:04:03 +0000 (16:04 +0200)]
[S390] nss,initrd: kernel image and initrd must be in different segments
When IPL'ing from a block device and an NSS should be created we must
make sure that the kernel image and the initrd are in different 1MB
segments. Otherwise creating the NSS will fail.
So we make sure the initrd is 4MB behind the end of the kernel image
like we do already when IPL via the VM reader is performed.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Jeff Layton [Mon, 8 Aug 2011 15:50:24 +0000 (11:50 -0400)]
cifs: demote cERROR in build_path_from_dentry to cFYI
Running the cthon tests on a recent kernel caused this message to pop
occasionally:
CIFS VFS: did not end path lookup where expected namelen is 0
Some added debugging showed that namelen and dfsplen were both 0 when
this occurred. That means that the read_seqretry returned true.
Assuming that the comment inside the if statement is true, this should
be harmless and just means that we raced with a rename. If that is the
case, then there's no need for alarm and we can demote this to cFYI.
While we're at it, print the dfsplen too so that we can see what
happened here if the message pops during debugging.
Cc: stable@kernel.org Cc: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Lothar Waßmann [Mon, 8 Aug 2011 12:47:47 +0000 (14:47 +0200)]
mxs-dma: enable CLKGATE before accessing registers
After calling mxs_dma_disable_chan() for a channel, that channel
becomes unusable because some controller registers can only be written
when the clock is enabled via CLKGATE.
Takashi Iwai [Tue, 16 Aug 2011 12:23:20 +0000 (14:23 +0200)]
ALSA: hda - Fix duplicated capture-volume creation for ALC268 models
Fix the duplicated creation of capture-mixer elements for some static
ALC268 configurations. The capture mixers must be put to cap_mixer field
instead of mixers array.
Jeff Brown [Mon, 15 Aug 2011 23:44:28 +0000 (16:44 -0700)]
HID: hid-multitouch: Filter collections by application usage.
This change fixes two problems.
First, it ensures that the hid-multitouch driver does not incorrectly
map GenericDesktop usages that are intended for other applications,
such as a Mouse.
Second, it sets the appropriate input properties so that user-space
can distinguish TouchScreen devices (INPUT_PROP_DIRECT) from
TouchPad devices (INPUT_PROP_POINTER) and configure them accordingly.
Signed-off-by: jeffbrown@android.com Acked-By: Benjamin Tissoires <Benjamin_Tissoires@logitech.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Herbert Xu [Tue, 16 Aug 2011 06:03:05 +0000 (14:03 +0800)]
crypto: sha - Fix build error due to crypto_sha1_update
On Tue, Aug 16, 2011 at 03:22:34PM +1000, Stephen Rothwell wrote:
>
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) produced this warning:
>
> In file included from security/integrity/ima/../integrity.h:16:0,
> from security/integrity/ima/ima.h:27,
> from security/integrity/ima/ima_policy.c:20:
> include/crypto/sha.h:86:10: warning: 'struct shash_desc' declared inside parameter list
> include/crypto/sha.h:86:10: warning: its scope is only this definition or declaration, which is probably not what you want
>
> Introduced by commit 7c390170b493 ("crypto: sha1 - export sha1_update for
> reuse"). I guess you need to include crypto/hash.h in crypto/sha.h.
This patch fixes this by providing a declaration for struct shash_desc.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Stephen Rothwell [Mon, 15 Aug 2011 23:36:06 +0000 (09:36 +1000)]
regmap: using module facilities requires module.h
Commit b33f9cbd67ba ("regmap: Specify a module license") added a
MODULES_LICENSE to this file without adding an include of module.h.
module.h should have been included anyway, since this file has
EXPORT_SYMBOLs as well. With the pending module.h split up, this would
probably have caused build problems.
Cc: Stephen Warren <swarren@nvidia.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 16 Aug 2011 02:24:42 +0000 (19:24 -0700)]
Merge branch 'docs-move' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs
* 'docs-move' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs:
Docs: MSI-HOWTO: MSI -> MSIs
Docs: MSI-HOWTO: Insert a comma
Docs: MSI-HOWTO: can -> could
Docs: MSI-HOWTO: Use `unknown ...' rather than `... know about.'
Docs: MSI-HOWTO: may -> might
Docs: MSI-HOWTO: Insert a comma
Docs: MSI-HOWTO: API -> function
Docs: MSI-HOWTO: , -> ;
Docs: MSI-HOWTO: Move a sentence to another paragraph
Docs: MSI-HOWTO: Insert `that'
Docs: MSI-HOWTO: Offset modifier with a comma, and insert `yet' for emphasis
Docs: MSI-HOWTO: Put the `because' subordinate clause first
Docs: MSI-HOWTO: Streamline some wording
Docs: MSI-HOWTO: `asked for' -> `requested'
Docs: MSI-HOWTO: Use present tense and streamline some wording
Docs: MSI-HOWTO: Use the subjunctive, and change `can' to `may'
Linus Torvalds [Tue, 16 Aug 2011 02:14:18 +0000 (19:14 -0700)]
Merge branch 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6
* 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6:
drm/i915: Cannot set clock gating under UMS
drm/i915: Can't do accurate vblank timestamps with UMS
Not all systems expose a firmware or platform mechanism for changing the backlight intensity on i915, so add native driver support.
drm/i915: split out PCH refclk update code
drm/i915: show interrupt info on IVB
drm/i915: Remove unused 'reg' argument to dp_pipe_enabled
drm/i915: Fix PCH port pipe select in CPT disable paths
drm/i915: Leave LVDS registers unlocked
drm/i915: Wait for LVDS panel power sequence
ASoC: DAPM: Allow multiple mixer sources to be routed via the same switch
Currently it is only possible to route one source per switch into a mixer.
This patch modifies the code, so that it is possible to route multiple sources
into a mixer via the same switch. One use-case for this is routing a stereo
channel pair into a mono-mixer via the same switch.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>