]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
13 years agopowerpc: Fix div64 in bootloader
Benjamin Herrenschmidt [Thu, 18 Nov 2010 03:39:24 +0000 (14:39 +1100)]
powerpc: Fix div64 in bootloader

The code is missing a fix that went into the main kernel variant
(we should try to share that code again at some stage)

Reported-by: Albert Cahalan <acahalan@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agojbd2: fix /proc/fs/jbd2/<dev> when using an external journal
yangsheng [Thu, 18 Nov 2010 02:46:26 +0000 (21:46 -0500)]
jbd2: fix /proc/fs/jbd2/<dev> when using an external journal

In jbd2_journal_init_dev(), we need make sure the journal structure is
fully initialzied before calling jbd2_stats_proc_init().

Reviewed-by: Andreas Dilger <andreas.dilger@oracle.com>
Signed-off-by: yangsheng <sheng.yang@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agoext4: missing unlock in ext4_clear_request_list()
Dan Carpenter [Thu, 18 Nov 2010 02:46:25 +0000 (21:46 -0500)]
ext4: missing unlock in ext4_clear_request_list()

If the the li_request_list was empty then it returned with the lock
held.  Instead of adding a "goto unlock" I just removed that special
case and let it go past the empty list_for_each_safe().

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agoext4: fix setting random pages PageUptodate
Markus Trippelsdorf [Thu, 18 Nov 2010 02:46:06 +0000 (21:46 -0500)]
ext4: fix setting random pages PageUptodate

ext4_end_bio calls put_page and kmem_cache_free before calling
SetPageUpdate(). This can result in setting the PageUptodate bit on
random pages and causes the following BUG:

 BUG: Bad page state in process rm  pfn:52e54
 page:ffffea0001222260 count:0 mapcount:0 mapping:          (null) index:0x0
 arch kernel: page flags: 0x4000000000000008(uptodate)

Fix the problem by moving put_io_page() after the SetPageUpdate() call.

Thanks to Hugh Dickins for analyzing this problem.

Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Tested-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agohardirq.h: remove now-empty #ifdef/#endif pair
Linus Torvalds [Thu, 18 Nov 2010 02:36:25 +0000 (18:36 -0800)]
hardirq.h: remove now-empty #ifdef/#endif pair

Commit 451a3c24b013 ("BKL: remove extraneous #include <smp_lock.h>")
removed the #include line that was the only thing that was surrounded by
the #ifdef/#endif.

So now that #ifdef is guarding nothing at all. Just remove it.

Reported-by: Byeong-ryeol Kim <brofkims@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoFix build failure due to hwirq.h needing smp_lock.h
Linus Torvalds [Wed, 17 Nov 2010 22:58:36 +0000 (14:58 -0800)]
Fix build failure due to hwirq.h needing smp_lock.h

Arnd Bergmann did an automated scripting run to find left-over instances
of <linux/smp_lock.h>, and had made it trigger it on the normal BKL use
of lock_kernel and unlock_lernel (and apparently release_kernel_lock and
reacquire_kernel_lock too, used by the scheduler).

That resulted in commit 451a3c24b013 ("BKL: remove extraneous #include
<smp_lock.h>").

However, hardirq.h was the only remaining user of the old
'kernel_locked()' interface, and Arnd's script hadn't checked for that.
So depending on your configuration and what header files had been
included, you would get errors like "implicit declaration of function
'kernel_locked'" during the build.

The right fix is not to just re-instate the smp_lock.h include - it is
to just remove 'kernel_locked()' entirely, since the only use was this
one special low-level detail.  Just make hardirq.h do it directly.

In fact this simplifies and clarifies the code, because some trivial
analysis makes it clear that hardirq.h only ever used _one_ of the two
definitions of kernel_locked(), so we can remove the other one entirely.

Reported-by: Zimny Lech <napohybelskurwysynom2010@gmail.com>
Reported-and-acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoKVM: VMX: Fix host userspace gsbase corruption
Avi Kivity [Thu, 11 Nov 2010 10:37:26 +0000 (12:37 +0200)]
KVM: VMX: Fix host userspace gsbase corruption

We now use load_gs_index() to load gs safely; unfortunately this also
changes MSR_KERNEL_GS_BASE, which we managed separately.  This resulted
in confusion and breakage running 32-bit host userspace on a 64-bit kernel.

Fix by
- saving guest MSR_KERNEL_GS_BASE before we we reload the host's gs
- doing the host save/load unconditionally, instead of only when in guest
  long mode

Things can be cleaned up further, but this is the minmal fix for now.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
13 years agoKVM: Correct ordering of ldt reload wrt fs/gs reload
Avi Kivity [Tue, 19 Oct 2010 16:48:35 +0000 (18:48 +0200)]
KVM: Correct ordering of ldt reload wrt fs/gs reload

If fs or gs refer to the ldt, they must be reloaded after the ldt.  Reorder
the code to that effect.

Userspace code that uses the ldt with kvm is nonexistent, so this doesn't fix
a user-visible bug.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
13 years agogianfar: fix signedness issue
Nicolas Kaiser [Mon, 15 Nov 2010 10:59:42 +0000 (10:59 +0000)]
gianfar: fix signedness issue

irq_of_parse_and_map() has an unsigned return type.
Testing for a negative error value doesn't work here.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: bnx2x: fix error value sign
Vasiliy Kulikov [Sun, 14 Nov 2010 10:08:34 +0000 (10:08 +0000)]
net: bnx2x: fix error value sign

bnx2x_init_one() should return negative value on error.
By mistake it returns ENODEV instead of -ENODEV.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years ago8139cp: fix checksum broken
Shan Wei [Wed, 17 Nov 2010 19:55:08 +0000 (11:55 -0800)]
8139cp: fix checksum broken

I am not family with RealTek RTL-8139C+ series 10/100 PCI Ethernet driver.
I try to guess the meaning of RxProtoIP and IPFail.
RxProtoIP stands for received IPv4 packet that upper protocol is not tcp and udp.
!(status & IPFail) is true means that driver correctly to check checksum in IPv4 header.

If these are right, driver will set ip_summed with CHECKSUM_UNNECESSARY for other
upper protocol, e.g. sctp, igmp protocol. This will cause protocol stack ignores
checksum check for packets with invalid checksum.

This patch is only compile-test.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agor8169: fix checksum broken
Shan Wei [Fri, 12 Nov 2010 00:15:25 +0000 (00:15 +0000)]
r8169: fix checksum broken

If r8196 received packets with invalid sctp/igmp(not tcp, udp) checksum, r8196 set skb->ip_summed
wit CHECKSUM_UNNECESSARY. This cause that upper protocol don't check checksum field.

I am not family with r8196 driver. I try to guess the meaning of RxProtoIP and IPFail.
RxProtoIP stands for received IPv4 packet that upper protocol is not tcp and udp.
!(opts1 & IPFail) is true means that driver correctly to check checksum in IPv4 header.

If it's right, I think we should not set ip_summed wit CHECKSUM_UNNECESSARY for my sctp packets
with invalid checksum.

If it's not right, please tell me.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agords: Integer overflow in RDS cmsg handling
Dan Rosenberg [Wed, 17 Nov 2010 06:37:16 +0000 (06:37 +0000)]
rds: Integer overflow in RDS cmsg handling

In rds_cmsg_rdma_args(), the user-provided args->nr_local value is
restricted to less than UINT_MAX.  This seems to need a tighter upper
bound, since the calculation of total iov_size can overflow, resulting
in a small sock_kmalloc() allocation.  This would probably just result
in walking off the heap and crashing when calling rds_rdma_pages() with
a high count value.  If it somehow doesn't crash here, then memory
corruption could occur soon after.

Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agokgdb,ppc: Fix regression in evr register handling
Dongdong Deng [Tue, 16 Nov 2010 22:02:00 +0000 (16:02 -0600)]
kgdb,ppc: Fix regression in evr register handling

Commit ff10b88b5a05c8f1646dd15fb9f6093c1384ff6d (kgdb,ppc: Individual
register get/set for ppc) introduced a problem where memcpy was used
incorrectly to read and write the evr registers with a kernel that
has:

CONFIG_FSL_BOOKE=y
CONFIG_SPE=y
CONFIG_KGDB=y

This patch also fixes the following compilation problems:

arch/powerpc/kernel/kgdb.c: In function 'dbg_get_reg':
arch/powerpc/kernel/kgdb.c:341: error: passing argument 2 of 'memcpy' makes pointer from integer without a cast
arch/powerpc/kernel/kgdb.c: In function 'dbg_set_reg':
arch/powerpc/kernel/kgdb.c:366: error: passing argument 1 of 'memcpy' makes pointer from integer without a cast

[jason.wessel@windriver.com: Remove void * casts and fix patch header]
Reported-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
CC: linuxppc-dev@lists.ozlabs.org
13 years agokgdb,x86: fix regression in detach handling
Jason Wessel [Mon, 15 Nov 2010 14:07:35 +0000 (08:07 -0600)]
kgdb,x86: fix regression in detach handling

The fix from ba773f7c510c0b252145933926c636c439889207
(x86,kgdb: Fix hw breakpoint regression) was not entirely complete.

The kgdb_remove_all_hw_break() function also needs to call the
hw_break_release_slot() or else a breakpoint can get activated again
after the debugger has detached.

The kgdb test suite exposes the behavior in the form of either a hang
or repetitive failure.  The kernel config that exposes the problem
contains all of the following:

CONFIG_DEBUG_RODATA=y
CONFIG_KGDB_TESTS=y
CONFIG_KGDB_TESTS_ON_BOOT=y
CONFIG_KGDB_TESTS_BOOT_STRING="V1F100"

Reported-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Tested-by: Frederic Weisbecker <fweisbec@gmail.com>
13 years agokdb: fix crash when KDB_BASE_CMD_MAX is exceeded
Jovi Zhang [Wed, 10 Nov 2010 13:22:18 +0000 (07:22 -0600)]
kdb: fix crash when KDB_BASE_CMD_MAX is exceeded

When the number of dyanmic kdb commands exceeds KDB_BASE_CMD_MAX, the
kernel will fault.

Signed-off-by: Jovi Zhang <bookjovi@gmail.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
13 years agokdb: fix memory leak in kdb_main.c
Jovi Zhang [Wed, 10 Nov 2010 13:22:18 +0000 (07:22 -0600)]
kdb: fix memory leak in kdb_main.c

Call kfree in the error path as well as the success path in kdb_ll().

Signed-off-by: Jovi Zhang <bookjovi@gmail.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
13 years agoASoC: davinci: fixes for multi-component
Chris Paulson-Ellis [Tue, 16 Nov 2010 12:27:09 +0000 (12:27 +0000)]
ASoC: davinci: fixes for multi-component

Multi-component commit f0fba2ad broke a few things which this patch should
fix. Tested on the DM355 EVM. I've been as careful as I can, but it would be
good if those with access to other Davinci boards could test.

--

The multi-component commit put the initialisation of
snd_soc_dai.[capture|playback]_dma_data into snd_soc_dai_ops.hw_params of the
McBSP, McASP & VCIF drivers (davinci-i2s.c, davinci-mcasp.c & davinci-vcif.c).
The initialisation had to be moved from the probe function in these drivers
because davinci_*_dai changed from snd_soc_dai to snd_soc_dai_driver.

Unfortunately, the DMA params pointer is needed by davinci_pcm_open (in
davinci-pcm.c) before hw_params is called. I have moved the initialisation to
a new snd_soc_dai_ops.startup function in each of these drivers. This fix
indicates that all platforms that use davinci-pcm must have been broken and
need to test with this fix.

--

The multi-component commit also changed the McBSP driver name from
"davinci-asp" to "davinci-i2s" in davinci-i2s.c without updating the board
level references to the driver name. This change is understandable, as there
is a similarly named "davinci-mcasp" driver in davinci-mcasp.c.

There is probably no 'correct' name for this driver. The DM6446 datasheet
calls it the "ASP" and describes it as a "specialised McBSP". The DM355
datasheet calls it the "ASP" and describes it as a "specialised ASP". The
DM365 datasheet calls it the "McBSP". Rather than fix this problem by
reverting to "davinci-asp", I've elected to avoid future confusion with the
"davinci-mcasp" driver by changing it to "davinci-mcbsp", which is also
consistent with the names of the functions in the driver. There are other
fixes required, so it was never going to be as simple as a revert anyway.

--

The DM365 only has one McBSP port (of the McBSP platforms, only the DM355 has
2 ports), so I've changed the the id of the platform_device from 0 to -1.

--

In davinci-evm.c, the DM6446 EVM can no longer share a snd_soc_dai_link
structure with the DM355 EVM as they use different cpu DAI names (the DM355
has 2 ports and the EVM uses the second port, but the DM6446 only has 1 port).
This also means that the 2 boards need different snd_soc_card structures.

--

The codec_name entries in davinci-evm.c didn't match the i2c ids in the board
files. I have only checked and fixed the details of the names used for the
McBSP based platforms. Someone with a McASP based platform (eg DA8xx) should
check the others.

Signed-off-by: Chris Paulson-Ellis <chris@edesix.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Fix register cache setup WM8994 for multi-component
Mark Brown [Tue, 16 Nov 2010 18:39:19 +0000 (18:39 +0000)]
ASoC: Fix register cache setup WM8994 for multi-component

During the multi-component conversion the WM8994 register cache init
got lost.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years ago[libata] remove SCSI host lock and serial number usage from ata_scsi_queuecmd
Jeff Garzik [Wed, 17 Nov 2010 17:03:58 +0000 (12:03 -0500)]
[libata] remove SCSI host lock and serial number usage from ata_scsi_queuecmd

cmd->serial_number is never tested in any path we reach; therefore we may
remove the call to scsi_cmd_get_serial() inside DEF_SCSI_QCMD, the SCSI
host_lock acquisition surrounding it, and our own SCSI host_lock
unlock+relock cycle.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
13 years agoBKL: remove references to lock_kernel from comments
Arnd Bergmann [Wed, 17 Nov 2010 15:26:56 +0000 (16:26 +0100)]
BKL: remove references to lock_kernel from comments

Lock_kernel is gone from the code, so the comments should be updated,
too.  nfsd now uses lock_flocks instead of lock_kernel to protect
against posix file locks.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: J. Bruce Fields <bfields@redhat.com>
Cc: linux-nfs@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoBKL: remove extraneous #include <smp_lock.h>
Arnd Bergmann [Wed, 17 Nov 2010 15:26:55 +0000 (16:26 +0100)]
BKL: remove extraneous #include <smp_lock.h>

The big kernel lock has been removed from all these files at some point,
leaving only the #include.

Remove this too as a cleanup.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agostaging/stradis: mark as "depends on BKL"
Arnd Bergmann [Wed, 17 Nov 2010 15:26:53 +0000 (16:26 +0100)]
staging/stradis: mark as "depends on BKL"

The stradis driver is on its way out, but it should still be marked
correctly as depending on the big kernel lock.  It could easily be
changed to not require it if someone decides to revive the driver and
port it to v4l2 in the process.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reported-by: Sedat Dilek <sedat.dilek@googlemail.com>
Cc: Nathan Laredo <laredo@gnu.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agosh: fix vsyscall compilation due to .eh_frame issue
Giuseppe CAVALLARO [Wed, 17 Nov 2010 06:51:52 +0000 (06:51 +0000)]
sh: fix vsyscall compilation due to .eh_frame issue

This patch fixes the following error obtained when
compile the Kernel with the VSYSCALL support enabled:

  SYSCALL arch/sh/kernel/vsyscall/vsyscall-trapa.so
  sh4-linux/bin/ld: error in arch/sh/kernel/vsyscall/vsyscall-trapa.o(.eh_frame);
  no .eh_frame_hdr table will be created.
  AS      arch/sh/kernel/vsyscall/vsyscall-syscall.o

Disassembling the vsyscall-trapa.o code, with this fix applied,
we get the __kernel_vsyscall symbol defined; otherwise it was
missing.

Disassembly of section .text:

00000000 <__kernel_vsyscall>:
   0: 10 00        .word 0x0010
   2: 00 00        .word 0x0000
[snip]
0000040 <__kernel_sigreturn>:
  40: 05 93        mov.w 4e <__kernel_sigreturn+0xe>,r3 ! 77
  42: 10 c3        trapa #16
[snip]

00000060 <__kernel_rt_sigreturn>:
  60: 05 93        mov.w 6e <__kernel_rt_sigreturn+0xe>,r3 ! ad
  62: 10 c3        trapa #16
[snip]

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Reviewed-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agosh: avoid to flush all cache in sys_cacheflush
Giuseppe CAVALLARO [Wed, 17 Nov 2010 06:51:08 +0000 (06:51 +0000)]
sh: avoid to flush all cache in sys_cacheflush

Calling sys_cacheflush with ICACHE we can direclty flush
the icache without invoking the flush_cache_all function.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agolxfb: Program panel v/h sync output polarity correctly
Daniel Drake [Sun, 14 Nov 2010 14:12:31 +0000 (14:12 +0000)]
lxfb: Program panel v/h sync output polarity correctly

Commit b5c26f97ec4a17c65 introduced some breakage for the OLPC XO-1 laptop,
differences in the output video signal after the patch caused some problems
with the XO's display controller chip.

Reviewing of that commit against the AMD Geode LX Data Book, it seems
that these bits were being set inversely. In both cases, active high
output is denoted by a value of 0. See section 6.8.3.44 of the databook
from February 2009 (Publication ID: 33234H)

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agofbcmap: integer overflow bug
Dan Carpenter [Tue, 16 Nov 2010 09:11:02 +0000 (12:11 +0300)]
fbcmap: integer overflow bug

There is an integer overflow in fb_set_user_cmap() because cmap->len * 2
can wrap.  It's basically harmless.  Your terminal will be messed up
until you type reset.

This patch does three things to fix the bug.

First, it checks the return value of fb_copy_cmap() in fb_alloc_cmap().
That is enough to fix address the overflow.

Second it checks for the integer overflow in fb_set_user_cmap().

Lastly I wanted to cap "cmap->len" in fb_set_user_cmap() much lower
because it gets used to determine the size of allocation.  Unfortunately
no one knows what the limit should be.  Instead what this patch does
is makes the allocation happen with GFP_KERNEL instead of GFP_ATOMIC
and lets the kmalloc() decide what values of cmap->len are reasonable.
To do this, the patch introduces a function called fb_alloc_cmap_gfp()
which is like fb_alloc_cmap() except that it takes a GFP flag.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agofbcmap: cleanup white space in fb_alloc_cmap()
Dan Carpenter [Sat, 13 Nov 2010 10:06:38 +0000 (13:06 +0300)]
fbcmap: cleanup white space in fb_alloc_cmap()

checkpatch.pl and Andrew Morton both complained about the indenting in
fb_alloc_cmap()

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoMAINTAINERS: Add fbdev patchwork entry, tidy up file patterns.
Paul Mundt [Wed, 17 Nov 2010 04:08:58 +0000 (13:08 +0900)]
MAINTAINERS: Add fbdev patchwork entry, tidy up file patterns.

Now that the patchwork queue is up, add it in. While we're at it, fix up
the file patterns, too.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agokernel: make /proc/kallsyms mode 400 to reduce ease of attacking
Marcus Meissner [Tue, 16 Nov 2010 10:46:03 +0000 (11:46 +0100)]
kernel: make /proc/kallsyms mode 400 to reduce ease of attacking

Making /proc/kallsyms readable only for root by default makes it
slightly harder for attackers to write generic kernel exploits by
removing one source of knowledge where things are in the kernel.

This is the second submit, discussion happened on this on first submit
and mostly concerned that this is just one hole of the sieve ...  but
one of the bigger ones.

Changing the permissions of at least System.map and vmlinux is also
required to fix the same set, but a packaging issue.

Target of this starter patch and follow ups is removing any kind of
kernel space address information leak from the kernel.

[ Side note: the default of root-only reading is the "safe" value, and
  it's easy enough to then override at any time after boot.  The /proc
  filesystem allows root to change the permissions with a regular
  chmod, so you can "revert" this at run-time by simply doing

    chmod og+r /proc/kallsyms

  as root if you really want regular users to see the kernel symbols.
  It does help some tools like "perf" figure them out without any
  setup, so it may well make sense in some situations.  - Linus ]

Signed-off-by: Marcus Meissner <meissner@suse.de>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Eugene Teo <eugeneteo@kernel.org>
Reviewed-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
Linus Torvalds [Wed, 17 Nov 2010 02:46:28 +0000 (18:46 -0800)]
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6

* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
  nfs: Ignore kmemleak false positive in nfs_readdir_make_qstr
  SUNRPC: Simplify rpc_alloc_iostats by removing pointless local variable
  nfs: trivial: remove unused nfs_wait_event macro
  NFS: readdir shouldn't read beyond the reply returned by the server
  NFS: Fix a couple of regressions in readdir.
  Revert "NFSv4: Fall back to ordinary lookup if nfs4_atomic_open() returns EISDIR"
  Regression: fix mounting NFS when NFSv3 support is not compiled
  NLM: Fix a regression in lockd

13 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 16 Nov 2010 23:20:05 +0000 (15:20 -0800)]
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched: Fix cross-sched-class wakeup preemption
  sched: Fix runnable condition for stoptask
  sched: Use group weight, idle cpu metrics to fix imbalances during idle

13 years agoMerge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspe...
Linus Torvalds [Tue, 16 Nov 2010 23:18:17 +0000 (15:18 -0800)]
Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6

* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
  PM / PM QoS: Fix reversed min and max
  PM / OPP: Hide OPP configuration when SoCs do not provide an implementation
  PM: Allow devices to be removed during late suspend and early resume

13 years agoxen/events: use locked set|clear_bit() for cpu_evtchn_mask
Jeremy Fitzhardinge [Tue, 16 Nov 2010 22:56:47 +0000 (14:56 -0800)]
xen/events: use locked set|clear_bit() for cpu_evtchn_mask

The per-cpu event channel masks can be updated unlocked from multiple
CPUs, so use the locked variant.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
13 years agoxen/evtchn: clear secondary CPUs' cpu_evtchn_mask[] after restore
Jan Beulich [Tue, 16 Nov 2010 22:55:33 +0000 (14:55 -0800)]
xen/evtchn: clear secondary CPUs' cpu_evtchn_mask[] after restore

To bind all event channels to CPU#0, it is not sufficient to set all
of its cpu_evtchn_mask[] bits; all other CPUs also need to get their
bits cleared. Otherwise, evtchn_do_upcall() will start handling
interrupts on CPUs they're not intended to run on, which can be
particularly bad for per-CPU ones.

[ linux-2.6.18-xen.hg 7de7453dee36 ]

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
13 years agoMerge branch 'futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 16 Nov 2010 22:31:03 +0000 (14:31 -0800)]
Merge branch 'futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  futex: Address compiler warnings in exit_robust_list

13 years agoUSB: EHCI: fix obscure race in ehci_endpoint_disable
Alan Stern [Tue, 16 Nov 2010 15:57:37 +0000 (10:57 -0500)]
USB: EHCI: fix obscure race in ehci_endpoint_disable

This patch (as1435) fixes an obscure and unlikely race in ehci-hcd.
When an async URB is unlinked, the corresponding QH is removed from
the async list.  If the QH's endpoint is then disabled while the URB
is being given back, ehci_endpoint_disable() won't find the QH on the
async list, causing it to believe that the QH has been lost.  This
will lead to a memory leak at best and quite possibly to an oops.

The solution is to trust usbcore not to lose track of endpoints.  If
the QH isn't on the async list then it doesn't need to be taken off
the list, but the driver should still wait for the QH to become IDLE
before disabling it.

In theory this fixes Bugzilla #20182.  In fact the race is so rare
that it's not possible to tell whether the bug is still present.
However, adding delays and making other changes to force the race
seems to show that the patch works.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
CC: David Brownell <david-b@pacbell.net>
CC: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: gadget: AT91: fix typo in atmel_usba_udc driver
Josh Wu [Tue, 16 Nov 2010 10:51:32 +0000 (11:51 +0100)]
USB: gadget: AT91: fix typo in atmel_usba_udc driver

compile fix for bug introduced by 969affff547027)

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: isp1362-hcd - fix section mismatch warning
Axel Lin [Tue, 9 Nov 2010 01:16:39 +0000 (09:16 +0800)]
USB: isp1362-hcd - fix section mismatch warning

Fix section mismatch warning by using "__devinit" annotation for isp1362_probe.

WARNING: drivers/usb/host/isp1362-hcd.o(.data+0x0): Section mismatch in reference from the variable isp1362_driver to the function .init.text:isp1362_probe()
The variable isp1362_driver references
the function __init isp1362_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: EHCI: AMD periodic frame list table quirk
Andiry Xu [Mon, 8 Nov 2010 09:58:35 +0000 (17:58 +0800)]
USB: EHCI: AMD periodic frame list table quirk

On AMD SB700/SB800/Hudson-2/3 platforms, USB EHCI controller may read/write
to memory space not allocated to USB controller if there is longer than
normal latency on DMA read encountered. In this condition the exposure will
be encountered only if the driver has following format of Periodic Frame
List link pointer structure:

For any idle periodic schedule, the Frame List link pointers that have the
T-bit set to 1 intending to terminate the use of frame list link pointer
as a physical memory pointer.

Idle periodic schedule Frame List Link pointer shoule be in the following
format to avoid the issue:

Frame list link pointer should be always contains a valid pointer to a
inactive QHead with T-bit set to 0.

Signed-off-by: Andiry Xu <andiry.xu@amd.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoSCSI host lock push-down
Jeff Garzik [Tue, 16 Nov 2010 07:10:29 +0000 (02:10 -0500)]
SCSI host lock push-down

Move the mid-layer's ->queuecommand() invocation from being locked
with the host lock to being unlocked to facilitate speeding up the
critical path for drivers who don't need this lock taken anyway.

The patch below presents a simple SCSI host lock push-down as an
equivalent transformation.  No locking or other behavior should change
with this patch.  All existing bugs and locking orders are preserved.

Additionally, add one parameter to queuecommand,
struct Scsi_Host *
and remove one parameter from queuecommand,
void (*done)(struct scsi_cmnd *)

Scsi_Host* is a convenient pointer that most host drivers need anyway,
and 'done' is redundant to struct scsi_cmnd->scsi_done.

Minimal code disturbance was attempted with this change.  Most drivers
needed only two one-line modifications for their host lock push-down.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Acked-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agocfg80211: fix extension channel checks to initiate communication
Luis R. Rodriguez [Sat, 13 Nov 2010 00:31:23 +0000 (16:31 -0800)]
cfg80211: fix extension channel checks to initiate communication

When operating in a mode that initiates communication and using
HT40 we should fail if we cannot use both primary and secondary
channels to initiate communication. Our current ht40 allowmap
only covers STA mode of operation, for beaconing modes we need
a check on the fly as the mode of operation is dynamic and
there other flags other than disable which we should read
to check if we can initiate communication.

Do not allow for initiating communication if our secondary HT40
channel has is either disabled, has a passive scan flag, a
no-ibss flag or is a radar channel. Userspace now has similar
checks but this is also needed in-kernel.

Reported-by: Jouni Malinen <jouni.malinen@atheros.com>
Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Set proper eeprom offset for AR9287 HTC devices
Rajkumar Manoharan [Wed, 10 Nov 2010 12:21:26 +0000 (17:51 +0530)]
ath9k_hw: Set proper eeprom offset for AR9287 HTC devices

AR9287 based PCI & USB devices are differed in eeprom start offset.
So set proper the offset for HTC devices to read nvram correctly.

Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add new devices into AR7010
Rajkumar Manoharan [Wed, 10 Nov 2010 12:21:25 +0000 (17:51 +0530)]
ath9k_htc: Add new devices into AR7010

Treat new PIDs (0xA704, 0x1200) as AR7010 devices.

Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Update usb device ID list
Rajkumar Manoharan [Wed, 10 Nov 2010 12:21:24 +0000 (17:51 +0530)]
ath9k_htc: Update usb device ID list

Added new VID/PIDs into supported devices list

Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Remove pm_qos request after hw unregister.
Vivek Natarajan [Wed, 10 Nov 2010 09:41:07 +0000 (15:11 +0530)]
ath9k: Remove pm_qos request after hw unregister.

Update pm_qos before removing it in deinit_device to prevent this
warning:

pm_qos_update_request() called for unknown object.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoxfrm: update flowi saddr in icmp_send if unset
Ulrich Weber [Fri, 5 Nov 2010 01:39:12 +0000 (01:39 +0000)]
xfrm: update flowi saddr in icmp_send if unset

otherwise xfrm_lookup will fail to find correct policy

Signed-off-by: Ulrich Weber <uweber@astaro.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxen/xenfs: update xenfs_mount for new prototype
Jeremy Fitzhardinge [Tue, 16 Nov 2010 19:06:46 +0000 (11:06 -0800)]
xen/xenfs: update xenfs_mount for new prototype

.mount now returns a struct dentry *.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
13 years agoMerge commit 'v2.6.37-rc2' into upstream/xenfs
Jeremy Fitzhardinge [Tue, 16 Nov 2010 19:06:22 +0000 (11:06 -0800)]
Merge commit 'v2.6.37-rc2' into upstream/xenfs

* commit 'v2.6.37-rc2': (10093 commits)
  Linux 2.6.37-rc2
  capabilities/syslog: open code cap_syslog logic to fix build failure
  i2c: Sanity checks on adapter registration
  i2c: Mark i2c_adapter.id as deprecated
  i2c: Drivers shouldn't include <linux/i2c-id.h>
  i2c: Delete unused adapter IDs
  i2c: Remove obsolete cleanup for clientdata
  include/linux/kernel.h: Move logging bits to include/linux/printk.h
  Fix gcc 4.5.1 miscompiling drivers/char/i8k.c (again)
  hwmon: (w83795) Check for BEEP pin availability
  hwmon: (w83795) Clear intrusion alarm immediately
  hwmon: (w83795) Read the intrusion state properly
  hwmon: (w83795) Print the actual temperature channels as sources
  hwmon: (w83795) List all usable temperature sources
  hwmon: (w83795) Expose fan control method
  hwmon: (w83795) Fix fan control mode attributes
  hwmon: (lm95241) Check validity of input values
  hwmon: Change mail address of Hans J. Koch
  PCI: sysfs: fix printk warnings
  GFS2: Fix inode deallocation race
  ...

13 years agoxen: fix header export to userspace
Randy Dunlap [Sat, 13 Nov 2010 16:44:39 +0000 (11:44 -0500)]
xen: fix header export to userspace

scripts/headers_install.pl prevents "__user" from being exported
to userspace headers, so just use compiler.h to make sure that
__user is defined and avoid the error.

unifdef: linux-next-20101112/xx64/usr/include/xen/privcmd.h.tmp: 79: Premature EOF (#if line 33 depth 1)

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: xen-devel@lists.xensource.com (moderated for non-subscribers)
Cc: virtualization@lists.osdl.org
Cc: Tony Finch <dot@dotat.at>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Tue, 16 Nov 2010 18:51:56 +0000 (10:51 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI: fix offset check for sysfs mmapped files

13 years agoirda: irttp: allow zero byte packets
Wolfram Sang [Tue, 16 Nov 2010 17:50:47 +0000 (09:50 -0800)]
irda: irttp: allow zero byte packets

Sending zero byte packets is not neccessarily an error (AF_INET accepts it,
too), so just apply a shortcut. This was discovered because of a non-working
software with WINE. See

  http://bugs.winehq.org/show_bug.cgi?id=19397#c86
  http://thread.gmane.org/gmane.linux.irda.general/1643

for very detailed debugging information and a testcase. Kudos to Wolfgang for
those!

Reported-by: Wolfgang Schwotzer <wolfgang.schwotzer@gmx.net>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Tested-by: Mike Evans <mike.evans@cardolan.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Tue, 16 Nov 2010 17:27:13 +0000 (09:27 -0800)]
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6

* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
  [S390] kprobes: Fix the return address of multiple kretprobes
  [S390] kprobes: disable interrupts throughout
  [S390] ftrace: build without frame pointers on s390
  [S390] mm: add devmem_is_allowed() for STRICT_DEVMEM checking
  [S390] vmlogrdr: purge after recording is switched off
  [S390] cio: fix incorrect ccw_device_init_count
  [S390] tape: add medium state notifications
  [S390] fix get_user_pages_fast

13 years agoPCI: fix offset check for sysfs mmapped files
Darrick J. Wong [Tue, 16 Nov 2010 17:13:41 +0000 (09:13 -0800)]
PCI: fix offset check for sysfs mmapped files

I just loaded 2.6.37-rc2 on my machines, and I noticed that X no longer starts.
Running an strace of the X server shows that it's doing this:

open("/sys/bus/pci/devices/0000:07:00.0/resource0", O_RDWR) = 10
mmap(NULL, 16777216, PROT_READ|PROT_WRITE, MAP_SHARED, 10, 0) = -1 EINVAL (Invalid argument)

This code seems to be asking for a shared read/write mapping of 16MB worth of
BAR0 starting at file offset 0, and letting the kernel assign a starting
address.  Unfortunately, this -EINVAL causes X not to start.  Looking into
dmesg, there's a complaint like so:

process "Xorg" tried to map 0x01000000 bytes at page 0x00000000 on 0000:07:00.0 BAR 0 (start 0x        96000000, size 0x         1000000)

...with the following code in pci_mmap_fits:

pci_start = (mmap_api == PCI_MMAP_SYSFS) ?
pci_resource_start(pdev, resno) >> PAGE_SHIFT : 0;
        if (start >= pci_start && start < pci_start + size &&
                        start + nr <= pci_start + size)

It looks like the logic here is set up such that when the mmap call comes via
sysfs, the check in pci_mmap_fits wants vma->vm_pgoff to be between the
resource's start and end address, and the end of the vma to be no farther than
the end.  However, the sysfs PCI resource files always start at offset zero,
which means that this test always fails for programs that mmap the sysfs files.
Given the comment in the original commit
3b519e4ea618b6943a82931630872907f9ac2c2b, I _think_ the old procfs files
require that the file offset be equal to the resource's base address when
mmapping.

I think what we want here is for pci_start to be 0 when mmap_api ==
PCI_MMAP_PROCFS.  The following patch makes that change, after which the Matrox
and Mach64 X drivers work again.

Acked-by: Martin Wilck <martin.wilck@ts.fujitsu.com>
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
13 years agonfs: Ignore kmemleak false positive in nfs_readdir_make_qstr
Catalin Marinas [Thu, 11 Nov 2010 12:53:47 +0000 (12:53 +0000)]
nfs: Ignore kmemleak false positive in nfs_readdir_make_qstr

Strings allocated via kmemdup() in nfs_readdir_make_qstr() are
referenced from the nfs_cache_array which is stored in a page cache
page. Kmemleak does not scan such pages and it reports several false
positives. This patch annotates the string->name pointer so that
kmemleak does not consider it a real leak.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Bryan Schumaker <bjschuma@netapp.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoSUNRPC: Simplify rpc_alloc_iostats by removing pointless local variable
Jesper Juhl [Sun, 7 Nov 2010 21:11:34 +0000 (22:11 +0100)]
SUNRPC: Simplify rpc_alloc_iostats by removing pointless local variable

Hi,

We can simplify net/sunrpc/stats.c::rpc_alloc_iostats() a bit by getting
rid of the unneeded local variable 'new'.

Please CC me on replies.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agonfs: trivial: remove unused nfs_wait_event macro
Jeff Layton [Fri, 12 Nov 2010 14:23:04 +0000 (09:23 -0500)]
nfs: trivial: remove unused nfs_wait_event macro

Nothing uses this macro anymore.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agokernel/sysctl.c: Fix build failure with !CONFIG_PRINTK
Joe Perches [Tue, 16 Nov 2010 05:17:27 +0000 (21:17 -0800)]
kernel/sysctl.c: Fix build failure with !CONFIG_PRINTK

Sigh...

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoInput: aiptek - tighten up permissions on sysfs attributes
Dmitry Torokhov [Mon, 15 Nov 2010 21:33:25 +0000 (13:33 -0800)]
Input: aiptek - tighten up permissions on sysfs attributes

Sysfs attributes affecting device behavior should not be, by default,
world-writeable. If distributions want to allow console users access
these attributes they need to employ udev and friends to adjust
permissions as needed.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoLinux 2.6.37-rc2
Linus Torvalds [Tue, 16 Nov 2010 02:31:02 +0000 (18:31 -0800)]
Linux 2.6.37-rc2

13 years agoNFS: readdir shouldn't read beyond the reply returned by the server
Trond Myklebust [Tue, 16 Nov 2010 01:26:22 +0000 (20:26 -0500)]
NFS: readdir shouldn't read beyond the reply returned by the server

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNFS: Fix a couple of regressions in readdir.
Trond Myklebust [Tue, 16 Nov 2010 01:26:22 +0000 (20:26 -0500)]
NFS: Fix a couple of regressions in readdir.

Fix up the issue that array->eof_index needs to be able to be set
even if array->size == 0.

Ensure that we catch all important memory allocation error conditions
and/or kmap() failures.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoRevert "NFSv4: Fall back to ordinary lookup if nfs4_atomic_open() returns EISDIR"
Trond Myklebust [Wed, 3 Nov 2010 14:24:16 +0000 (10:24 -0400)]
Revert "NFSv4: Fall back to ordinary lookup if nfs4_atomic_open() returns EISDIR"

This reverts commit 80e60639f1b7c121a7fea53920c5a4b94009361a.

This change requires further fixes to ensure that the open doesn't
succeed if the lookup later results in a regular file being created.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoRegression: fix mounting NFS when NFSv3 support is not compiled
Paulius Zaleckas [Sun, 31 Oct 2010 16:21:05 +0000 (18:21 +0200)]
Regression: fix mounting NFS when NFSv3 support is not compiled

Trying to mount NFS (root partition in my case) fails if CONFIG_NFS_V3
is not selected. nfs_validate_mount_data() returns EPROTONOSUPPORT,
because of this check:

#ifndef CONFIG_NFS_V3
if (args->version == 3)
goto out_v3_not_compiled;
#endif /* !CONFIG_NFS_V3 */

and args->version was always initialized to 3.

It was working in 2.6.36

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNLM: Fix a regression in lockd
Trond Myklebust [Tue, 2 Nov 2010 13:11:55 +0000 (09:11 -0400)]
NLM: Fix a regression in lockd

Nick Bowler reports:
There are no unusual messages on the client... but I just logged into
the server and I see lots of messages of the following form:

  nfsd: request from insecure port (192.168.8.199:35766)!
  nfsd: request from insecure port (192.168.8.199:35766)!
  nfsd: request from insecure port (192.168.8.199:35766)!
  nfsd: request from insecure port (192.168.8.199:35766)!
  nfsd: request from insecure port (192.168.8.199:35766)!

Bisected to commit 9247685088398cf21bcb513bd2832b4cd42516c4 (SUNRPC:
Properly initialize sock_xprt.srcaddr in all cases)

Apparently, removing the 'transport->srcaddr.ss_family = family' from
xs_create_sock() triggers this due to nlmclnt_lookup_host() incorrectly
initialising the srcaddr family to AF_UNSPEC.

Reported-by: Nick Bowler <nbowler@elliptictech.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agofbdev: da8xx: punt duplicated FBIO_WAITFORVSYNC define
Mike Frysinger [Mon, 15 Nov 2010 10:03:13 +0000 (05:03 -0500)]
fbdev: da8xx: punt duplicated FBIO_WAITFORVSYNC define

This is already defined by linux/fb.h now, so punt the duplicate
definition from the driver header.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agofbdev: sh_mobile_lcdcfb: fix bug in reconfig()
Arnd Hannemann [Mon, 15 Nov 2010 21:43:22 +0000 (21:43 +0000)]
fbdev: sh_mobile_lcdcfb: fix bug in reconfig()

The function sh_mobile_fb_reconfig() contained a bug,
which caused the line_length to be set wrongly, if a mode
with a different X-resolution than the default one was chosen.
This caused 1080p24 mode to not work on AP4EVB.
Additionally the notifier chain was also called with the wrong
mode.

This patch fixes this, by using the X-resolution of the new
mode instead of the old one to calculate line length and
hands over the correct mode to the notifier chain.

Signed-off-by: Arnd Hannemann <arnd@arndnet.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoMerge branch 'common/clkfwk' into sh-fixes-for-linus
Paul Mundt [Tue, 16 Nov 2010 01:11:20 +0000 (10:11 +0900)]
Merge branch 'common/clkfwk' into sh-fixes-for-linus

13 years agocapabilities/syslog: open code cap_syslog logic to fix build failure
Eric Paris [Mon, 15 Nov 2010 23:36:29 +0000 (18:36 -0500)]
capabilities/syslog: open code cap_syslog logic to fix build failure

The addition of CONFIG_SECURITY_DMESG_RESTRICT resulted in a build
failure when CONFIG_PRINTK=n.  This is because the capabilities code
which used the new option was built even though the variable in question
didn't exist.

The patch here fixes this by moving the capabilities checks out of the
LSM and into the caller.  All (known) LSMs should have been calling the
capabilities hook already so it actually makes the code organization
better to eliminate the hook altogether.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 15 Nov 2010 22:06:11 +0000 (14:06 -0800)]
Merge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6

* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
  arm: omap1: devices: need to return with a value
  OMAP1: camera.h: add missing include
  omap: dma: Add read-back to DMA interrupt handler to avoid spuriousinterrupts
  OMAP2: Devkit8000: Fix mmc regulator failure

13 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelv...
Linus Torvalds [Mon, 15 Nov 2010 22:05:44 +0000 (14:05 -0800)]
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: (w83795) Check for BEEP pin availability
  hwmon: (w83795) Clear intrusion alarm immediately
  hwmon: (w83795) Read the intrusion state properly
  hwmon: (w83795) Print the actual temperature channels as sources
  hwmon: (w83795) List all usable temperature sources
  hwmon: (w83795) Expose fan control method
  hwmon: (w83795) Fix fan control mode attributes
  hwmon: (lm95241) Check validity of input values
  hwmon: Change mail address of Hans J. Koch

13 years agoUSB: OTG: langwell_otg: fix up some sysfs attribute permissions
Greg Kroah-Hartman [Mon, 15 Nov 2010 19:37:55 +0000 (11:37 -0800)]
USB: OTG: langwell_otg: fix up some sysfs attribute permissions

They should not be writable by any user.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Hao Wu <hao.wu@intel.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Alek Du <alek.du@intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: misc: usbsevseg: fix up some sysfs attribute permissions
Greg Kroah-Hartman [Mon, 15 Nov 2010 19:36:44 +0000 (11:36 -0800)]
USB: misc: usbsevseg: fix up some sysfs attribute permissions

They should not be writable by any user.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Harrison Metzger <harrisonmetz@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: misc: usbled: fix up some sysfs attribute permissions
Greg Kroah-Hartman [Mon, 15 Nov 2010 19:35:49 +0000 (11:35 -0800)]
USB: misc: usbled: fix up some sysfs attribute permissions

They should not be writable by any user.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: misc: trancevibrator: fix up a sysfs attribute permission
Greg Kroah-Hartman [Mon, 15 Nov 2010 19:34:26 +0000 (11:34 -0800)]
USB: misc: trancevibrator: fix up a sysfs attribute permission

It should not be writable by any user.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Sam Hocevar <sam@zoy.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: misc: cypress_cy7c63: fix up some sysfs attribute permissions
Greg Kroah-Hartman [Mon, 15 Nov 2010 19:32:38 +0000 (11:32 -0800)]
USB: misc: cypress_cy7c63: fix up some sysfs attribute permissions

They should not be writable by any user.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oliver Bock <bock@tfh-berlin.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: storage: sierra_ms: fix sysfs file attribute
Greg Kroah-Hartman [Mon, 15 Nov 2010 19:17:52 +0000 (11:17 -0800)]
USB: storage: sierra_ms: fix sysfs file attribute

A non-writable sysfs file shouldn't have writable attributes.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Kevin Lloyd <klloyd@sierrawireless.com>
Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: ehci: fix debugfs 'lpm' permissions
Greg Kroah-Hartman [Mon, 15 Nov 2010 19:15:11 +0000 (11:15 -0800)]
USB: ehci: fix debugfs 'lpm' permissions

The permissions for the lpm debugfs file is incorrect, this fixes it.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Alek Du <alek.du@intel.com>
Cc: Jacob Pan <jacob.jun.pan@intel.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: atm: ueagle-atm: fix up some permissions on the sysfs files
Greg Kroah-Hartman [Mon, 15 Nov 2010 19:11:45 +0000 (11:11 -0800)]
USB: atm: ueagle-atm: fix up some permissions on the sysfs files

Some of the sysfs files had the incorrect permissions.  Some didn't make
sense at all (writable for a file that you could not write to?)

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matthieu Castet <castet.matthieu@free.fr>
Cc: Stanislaw Gruszka <stf_xl@wp.pl>
Cc: Damien Bergamini <damien.bergamini@free.fr>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoMerge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvar...
Linus Torvalds [Mon, 15 Nov 2010 22:03:17 +0000 (14:03 -0800)]
Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  i2c: Sanity checks on adapter registration
  i2c: Mark i2c_adapter.id as deprecated
  i2c: Drivers shouldn't include <linux/i2c-id.h>
  i2c: Delete unused adapter IDs
  i2c: Remove obsolete cleanup for clientdata

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Mon, 15 Nov 2010 22:01:33 +0000 (14:01 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI: sysfs: fix printk warnings
  PCI: fix pci_bus_alloc_resource() hang, prefer positive decode
  PCI: read current power state at enable time
  PCI: fix size checks for mmap() on /proc/bus/pci files
  x86/PCI: coalesce overlapping host bridge windows
  PCI hotplug: ibmphp: Add check to prevent reading beyond mapped area

13 years agoMerge branch 'for-usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah...
Greg Kroah-Hartman [Mon, 15 Nov 2010 22:00:10 +0000 (14:00 -0800)]
Merge branch 'for-usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-linus

* 'for-usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci:
  xhci: Fix command ring replay after resume.
  xHCI: fix wMaxPacketSize mask
  xHCI: release spinlock when setup interrupt
  xhci: Remove excessive printks with shared IRQs.

13 years agoPM / PM QoS: Fix reversed min and max
Colin Cross [Mon, 15 Nov 2010 21:45:22 +0000 (22:45 +0100)]
PM / PM QoS: Fix reversed min and max

pm_qos_get_value had min and max reversed, causing all pm_qos
requests to have no effect.

Signed-off-by: Colin Cross <ccross@android.com>
Acked-by: mark <markgross@thegnar.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: stable@kernel.org
13 years agoi2c: Sanity checks on adapter registration
Jean Delvare [Mon, 15 Nov 2010 21:40:38 +0000 (22:40 +0100)]
i2c: Sanity checks on adapter registration

Make sure I2C adapters being registered have the required struct
fields set. If they don't, problems will happen later.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoi2c: Mark i2c_adapter.id as deprecated
Jean Delvare [Mon, 15 Nov 2010 21:40:38 +0000 (22:40 +0100)]
i2c: Mark i2c_adapter.id as deprecated

It's about time to make it clear that i2c_adapter.id is deprecated.
Hopefully this will remind the last user to move over to a different
strategy.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Jarod Wilson <jarod@redhat.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
13 years agoi2c: Drivers shouldn't include <linux/i2c-id.h>
Jean Delvare [Mon, 15 Nov 2010 21:40:38 +0000 (22:40 +0100)]
i2c: Drivers shouldn't include <linux/i2c-id.h>

Drivers don't need to include <linux/i2c-id.h>, especially not when
they don't use anything that header file provides.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Michael Hunold <michael@mihu.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoi2c: Delete unused adapter IDs
Jean Delvare [Mon, 15 Nov 2010 21:40:38 +0000 (22:40 +0100)]
i2c: Delete unused adapter IDs

Delete unused I2C adapter IDs. Special cases are:

* I2C_HW_B_RIVA was still set in driver rivafb, however no other
  driver is ever looking for this value, so we can safely remove it.
* I2C_HW_B_HDPVR is used in staging driver lirc_zilog, however no
  adapter ID is ever set to this value, so the code in question never
  runs. As the code additionally expects that I2C_HW_B_HDPVR may not
  be defined, we can delete it now and let the lirc_zilog driver
  maintainer rewrite this piece of code.

Big thanks for Hans Verkuil for doing all the hard work :)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Jarod Wilson <jarod@redhat.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
13 years agoi2c: Remove obsolete cleanup for clientdata
Wolfram Sang [Mon, 15 Nov 2010 21:40:38 +0000 (22:40 +0100)]
i2c: Remove obsolete cleanup for clientdata

A few new i2c-drivers came into the kernel which clear the clientdata-pointer
on exit. This is obsolete meanwhile, so fix it and hope the word will spread.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Alan Cox <alan@linux.intel.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoinclude/linux/kernel.h: Move logging bits to include/linux/printk.h
Linus Torvalds [Mon, 15 Nov 2010 21:37:37 +0000 (13:37 -0800)]
include/linux/kernel.h: Move logging bits to include/linux/printk.h

Move the logging bits from kernel.h into printk.h so that
there is a bit more logical separation of the generic from
the printk logging specific parts.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoxhci: Fix command ring replay after resume.
Sarah Sharp [Fri, 12 Nov 2010 19:59:31 +0000 (11:59 -0800)]
xhci: Fix command ring replay after resume.

Andiry's xHCI bus suspend patch introduced the possibly of a host
controller replaying old commands on the command ring, if the host
successfully restores the registers after a resume.

After a resume from suspend, the xHCI driver must restore the registers,
including the command ring pointer.  I had suggested that Andiry set the
command ring pointer to the current command ring dequeue pointer, so that
the driver wouldn't have to zero the command ring.

Unfortunately, setting the command ring pointer to the current dequeue
pointer won't work because the register assumes the pointer is 64-byte
aligned, and TRBs on the command ring are 16-byte aligned.  The lower
seven bits will always be masked off, leading to the written pointer being
up to 3 TRBs behind the intended pointer.

Here's a log excerpt.  On init, the xHCI driver places a vendor-specific
command on the command ring:

[  215.750958] xhci_hcd 0000:01:00.0: Vendor specific event TRB type = 48
[  215.750960] xhci_hcd 0000:01:00.0: NEC firmware version 30.25
[  215.750962] xhci_hcd 0000:01:00.0: Command ring deq = 0x3781e010 (DMA)

When we resume, the command ring dequeue pointer to be written should have
been 0x3781e010.  Instead, it's 0x3781e000:

[  235.557846] xhci_hcd 0000:01:00.0: // Setting command ring address to 0x3781e001
[  235.557848] xhci_hcd 0000:01:00.0: `MEM_WRITE_DWORD(3'b000, 64'hffffc900100bc038, 64'h3781e001, 4'hf);
[  235.557850] xhci_hcd 0000:01:00.0: `MEM_WRITE_DWORD(3'b000, 32'hffffc900100bc020, 32'h204, 4'hf);
[  235.557866] usb usb9: root hub lost power or was reset

(I can't see the results of this bug because the xHCI restore always fails
on this box, and the xHCI driver re-allocates everything.)

The fix is to zero the command ring and put the software and hardware
enqueue and dequeue pointer back to the beginning of the ring.  We do this
before the system suspends, to be paranoid and prevent the BIOS from
starting the host without clearing the command ring pointer, which might
cause the host to muck with stale memory.  (The pointer isn't required to
be in the suspend power well, but it could be.)  The command ring pointer
is set again after the host resumes.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Tested-by: Andiry Xu <andiry.xu@amd.com>
13 years agoFix gcc 4.5.1 miscompiling drivers/char/i8k.c (again)
Jim Bos [Mon, 15 Nov 2010 20:22:37 +0000 (21:22 +0100)]
Fix gcc 4.5.1 miscompiling drivers/char/i8k.c (again)

The fix in commit 6b4e81db2552 ("i8k: Tell gcc that *regs gets
clobbered") to work around the gcc miscompiling i8k.c to add "+m
(*regs)" caused register pressure problems and a build failure.

Changing the 'asm' statement to 'asm volatile' instead should prevent
that and works around the gcc bug as well, so we can remove the "+m".

[ Background on the gcc bug: a memory clobber fails to mark the function
  the asm resides in as non-pure (aka "__attribute__((const))"), so if
  the function does nothing else that triggers the non-pure logic, gcc
  will think that that function has no side effects at all. As a result,
  callers will be mis-compiled.

  Adding the "+m" made gcc see that it's not a pure function, and so
  does "asm volatile". The problem was never really the need to mark
  "*regs" as changed, since the memory clobber did that part - the
  problem was just a bug in the gcc "pure" function analysis  - Linus ]

Signed-off-by: Jim Bos <jim876@xs4all.nl>
Acked-by: Jakub Jelinek <jakub@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agohwmon: (w83795) Check for BEEP pin availability
Jean Delvare [Mon, 15 Nov 2010 20:38:57 +0000 (21:38 +0100)]
hwmon: (w83795) Check for BEEP pin availability

On the W83795ADG, there's a single pin for BEEP and OVT#, so you
can't have both. Check the configuration and don't create beep
attributes when BEEP pin is not available.

The W83795G has a dedicated BEEP pin so the functionality is always
available there.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
13 years agohwmon: (w83795) Clear intrusion alarm immediately
Jean Delvare [Mon, 15 Nov 2010 20:38:57 +0000 (21:38 +0100)]
hwmon: (w83795) Clear intrusion alarm immediately

When asked to clear the intrusion alarm, do so immediately. We have to
invalidate the cache to make sure the new status will be read. But we
also have to read from the status register once to clear the pending
alarm, as writing to CLR_CHS surprising won't clear it automatically.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
13 years agohwmon: (w83795) Read the intrusion state properly
Jean Delvare [Mon, 15 Nov 2010 20:38:56 +0000 (21:38 +0100)]
hwmon: (w83795) Read the intrusion state properly

We can't read the intrusion state from the real-time alarm registers
as we do for all other alarm flags, because real-time alarm bits don't
stick (by definition) and the intrusion state has to stick until
explicitly cleared (otherwise it has little value.)

So we have to use the interrupt status register instead, which is read
from the same address but with a configuration bit flipped in another
register.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
13 years agohwmon: (w83795) Print the actual temperature channels as sources
Jean Delvare [Mon, 15 Nov 2010 20:38:56 +0000 (21:38 +0100)]
hwmon: (w83795) Print the actual temperature channels as sources

Don't expose raw register values to user-space. Decode and encode
temperature channels selected as temperature sources as needed.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
13 years agohwmon: (w83795) List all usable temperature sources
Jean Delvare [Mon, 15 Nov 2010 20:38:56 +0000 (21:38 +0100)]
hwmon: (w83795) List all usable temperature sources

Temperature sources are not correlated directly with temperature
channels. A look-up table is required to find out which temperature
sources can be used depending on which temperature channels (both
analog and digital) are enabled.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
13 years agohwmon: (w83795) Expose fan control method
Jean Delvare [Mon, 15 Nov 2010 20:38:56 +0000 (21:38 +0100)]
hwmon: (w83795) Expose fan control method

Expose fan control method (DC vs. PWM) using the standard sysfs
attributes. I've made it read-only as the board should be wired for
a given mode, the BIOS should have set up the chip for this mode, and
you shouldn't have to change it. But it would be easy enough to make
it changeable if someone comes up with a use case.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
13 years agohwmon: (w83795) Fix fan control mode attributes
Jean Delvare [Mon, 15 Nov 2010 20:38:56 +0000 (21:38 +0100)]
hwmon: (w83795) Fix fan control mode attributes

There were two bugs:
* Speed cruise mode was improperly reported for all fans but fan1.
* Fan control method (PWM vs. DC) was mixed with the control mode.
  It will be added back as a separate attribute, as per the standard
  sysfs interface.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
13 years agohwmon: (lm95241) Check validity of input values
Jean Delvare [Mon, 15 Nov 2010 20:38:56 +0000 (21:38 +0100)]
hwmon: (lm95241) Check validity of input values

This clears the following build-time warnings I was seeing:

drivers/hwmon/lm95241.c: In function "set_interval":
drivers/hwmon/lm95241.c:132:15: warning: ignoring return value of "strict_strtol", declared with attribute warn_unused_result
drivers/hwmon/lm95241.c: In function "set_max2":
drivers/hwmon/lm95241.c:278:1: warning: ignoring return value of "strict_strtol", declared with attribute warn_unused_result
drivers/hwmon/lm95241.c: In function "set_max1":
drivers/hwmon/lm95241.c:277:1: warning: ignoring return value of "strict_strtol", declared with attribute warn_unused_result
drivers/hwmon/lm95241.c: In function "set_min2":
drivers/hwmon/lm95241.c:249:1: warning: ignoring return value of "strict_strtol", declared with attribute warn_unused_result
drivers/hwmon/lm95241.c: In function "set_min1":
drivers/hwmon/lm95241.c:248:1: warning: ignoring return value of "strict_strtol", declared with attribute warn_unused_result
drivers/hwmon/lm95241.c: In function "set_type2":
drivers/hwmon/lm95241.c:220:1: warning: ignoring return value of "strict_strtol", declared with attribute warn_unused_result
drivers/hwmon/lm95241.c: In function "set_type1":
drivers/hwmon/lm95241.c:219:1: warning: ignoring return value of "strict_strtol", declared with attribute warn_unused_result

This also fixes a small race in set_interval() as a side effect: by
working with a temporary local variable we prevent data->interval from
being accessed at a time it contains the interval value in the wrong
unit.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Davide Rizzo <elpa.rizzo@gmail.com>
13 years agohwmon: Change mail address of Hans J. Koch
Hans J. Koch [Mon, 15 Nov 2010 20:38:56 +0000 (21:38 +0100)]
hwmon: Change mail address of Hans J. Koch

My old mail address doesn't exist anymore. This changes all occurrences
to my new address.

Signed-off-by: Hans J. Koch <hjk@hansjkoch.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>