]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agoMerge remote-tracking branch 'unicore32/unicore32'
Stephen Rothwell [Fri, 17 Aug 2012 00:33:40 +0000 (10:33 +1000)]
Merge remote-tracking branch 'unicore32/unicore32'

12 years agoMerge remote-tracking branch 's390/features'
Stephen Rothwell [Fri, 17 Aug 2012 00:32:16 +0000 (10:32 +1000)]
Merge remote-tracking branch 's390/features'

12 years agoMerge remote-tracking branch 'galak/next'
Stephen Rothwell [Fri, 17 Aug 2012 00:29:50 +0000 (10:29 +1000)]
Merge remote-tracking branch 'galak/next'

12 years agoMerge remote-tracking branch 'mpc5xxx/next'
Stephen Rothwell [Fri, 17 Aug 2012 00:28:25 +0000 (10:28 +1000)]
Merge remote-tracking branch 'mpc5xxx/next'

12 years agoMerge remote-tracking branch 'parisc/for-next'
Stephen Rothwell [Fri, 17 Aug 2012 00:27:00 +0000 (10:27 +1000)]
Merge remote-tracking branch 'parisc/for-next'

12 years agoMerge remote-tracking branch 'mips/mips-for-linux-next'
Stephen Rothwell [Fri, 17 Aug 2012 00:25:37 +0000 (10:25 +1000)]
Merge remote-tracking branch 'mips/mips-for-linux-next'

12 years agoMerge remote-tracking branch 'm68knommu/for-next'
Stephen Rothwell [Fri, 17 Aug 2012 00:24:14 +0000 (10:24 +1000)]
Merge remote-tracking branch 'm68knommu/for-next'

12 years agoMerge remote-tracking branch 'cris/for-next'
Stephen Rothwell [Fri, 17 Aug 2012 00:22:44 +0000 (10:22 +1000)]
Merge remote-tracking branch 'cris/for-next'

12 years agoMerge remote-tracking branch 'c6x/for-linux-next'
Stephen Rothwell [Fri, 17 Aug 2012 00:21:17 +0000 (10:21 +1000)]
Merge remote-tracking branch 'c6x/for-linux-next'

12 years agoMerge remote-tracking branch 'arm-perf/for-next/perf'
Stephen Rothwell [Fri, 17 Aug 2012 00:19:49 +0000 (10:19 +1000)]
Merge remote-tracking branch 'arm-perf/for-next/perf'

12 years agoMerge remote-tracking branch 'arm/for-next'
Stephen Rothwell [Fri, 17 Aug 2012 00:18:25 +0000 (10:18 +1000)]
Merge remote-tracking branch 'arm/for-next'

12 years agoMerge remote-tracking branch 'spi-current/spi/merge'
Stephen Rothwell [Fri, 17 Aug 2012 00:14:49 +0000 (10:14 +1000)]
Merge remote-tracking branch 'spi-current/spi/merge'

12 years agoMerge remote-tracking branch 'devicetree-current/devicetree/merge'
Stephen Rothwell [Fri, 17 Aug 2012 00:14:47 +0000 (10:14 +1000)]
Merge remote-tracking branch 'devicetree-current/devicetree/merge'

12 years agoMerge remote-tracking branch 'crypto-current/master'
Stephen Rothwell [Fri, 17 Aug 2012 00:14:40 +0000 (10:14 +1000)]
Merge remote-tracking branch 'crypto-current/master'

12 years agoMerge remote-tracking branch 'char-misc.current/char-misc-linus'
Stephen Rothwell [Fri, 17 Aug 2012 00:14:37 +0000 (10:14 +1000)]
Merge remote-tracking branch 'char-misc.current/char-misc-linus'

12 years agoMerge remote-tracking branch 'staging.current/staging-linus'
Stephen Rothwell [Fri, 17 Aug 2012 00:14:36 +0000 (10:14 +1000)]
Merge remote-tracking branch 'staging.current/staging-linus'

12 years agoMerge remote-tracking branch 'usb.current/usb-linus'
Stephen Rothwell [Fri, 17 Aug 2012 00:14:35 +0000 (10:14 +1000)]
Merge remote-tracking branch 'usb.current/usb-linus'

12 years agoMerge remote-tracking branch 'tty.current/tty-linus'
Stephen Rothwell [Fri, 17 Aug 2012 00:14:34 +0000 (10:14 +1000)]
Merge remote-tracking branch 'tty.current/tty-linus'

12 years agoMerge remote-tracking branch 'driver-core.current/driver-core-linus'
Stephen Rothwell [Fri, 17 Aug 2012 00:14:33 +0000 (10:14 +1000)]
Merge remote-tracking branch 'driver-core.current/driver-core-linus'

12 years agoMerge remote-tracking branch 'pci-current/for-linus'
Stephen Rothwell [Fri, 17 Aug 2012 00:14:32 +0000 (10:14 +1000)]
Merge remote-tracking branch 'pci-current/for-linus'

12 years agoMerge remote-tracking branch 'sound-current/for-linus'
Stephen Rothwell [Fri, 17 Aug 2012 00:14:31 +0000 (10:14 +1000)]
Merge remote-tracking branch 'sound-current/for-linus'

12 years agoMerge remote-tracking branch 'net/master'
Stephen Rothwell [Fri, 17 Aug 2012 00:14:30 +0000 (10:14 +1000)]
Merge remote-tracking branch 'net/master'

12 years agoMerge remote-tracking branch 'arm-current/fixes'
Stephen Rothwell [Fri, 17 Aug 2012 00:14:28 +0000 (10:14 +1000)]
Merge remote-tracking branch 'arm-current/fixes'

12 years agoMerge branches 'next/for-linus', 'next/generic', 'next/lantiq' and 'next/trace' into...
Ralf Baechle [Thu, 16 Aug 2012 22:25:33 +0000 (00:25 +0200)]
Merge branches 'next/for-linus', 'next/generic', 'next/lantiq' and 'next/trace' into mips-for-linux-next

12 years agoMIPS: Add support for syscall tracepoints.
Ralf Baechle [Thu, 16 Aug 2012 16:23:13 +0000 (18:23 +0200)]
MIPS: Add support for syscall tracepoints.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: Add support for SECCOMP_FILTER.
Ralf Baechle [Thu, 16 Aug 2012 16:23:13 +0000 (18:23 +0200)]
MIPS: Add support for SECCOMP_FILTER.

Enable tasks to build secure computing environments defined in terms
of Berkeley Packet Filter programs which implement task-defined system
call filtering polices.

See Documentation/prctl/seccomp_filter.txt for details.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: ptrace: Switch syscall reporting to tracehook_report_syscall_entry().
Ralf Baechle [Thu, 16 Aug 2012 16:23:13 +0000 (18:23 +0200)]
MIPS: ptrace: Switch syscall reporting to tracehook_report_syscall_entry().

Set ret just so __must_check is satisfied but don't use the variable for
anything yet.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: Move audit_arch() helper function to __syscall_get_arch().
Ralf Baechle [Thu, 16 Aug 2012 16:23:13 +0000 (18:23 +0200)]
MIPS: Move audit_arch() helper function to __syscall_get_arch().

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: Enable HAVE_ARCH_TRACEHOOK.
Ralf Baechle [Thu, 16 Aug 2012 16:23:01 +0000 (18:23 +0200)]
MIPS: Enable HAVE_ARCH_TRACEHOOK.

This enables /proc/<pid>/syscall and the ptrace PTRACE_GETREGSET and
PTRACE_SETREGSET operations.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: ptrace.h: Add commit to #endif of long ifdef block.
Ralf Baechle [Thu, 2 Aug 2012 13:41:09 +0000 (15:41 +0200)]
MIPS: ptrace.h: Add commit to #endif of long ifdef block.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: Switch ELF core dumper to use regsets.
Ralf Baechle [Thu, 2 Aug 2012 13:18:32 +0000 (15:18 +0200)]
MIPS: Switch ELF core dumper to use regsets.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: Implement task_user_regset_view.
Ralf Baechle [Thu, 2 Aug 2012 12:44:11 +0000 (14:44 +0200)]
MIPS: Implement task_user_regset_view.

There are no users yet of task_user_regset_view. yet; users will be
implemented rsp activated in subsequent commits.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: ptrace: Use tracehook helpers.
Ralf Baechle [Tue, 17 Jul 2012 17:43:58 +0000 (19:43 +0200)]
MIPS: ptrace: Use tracehook helpers.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: O32 / 32-bit: Always copy 4 stack arguments.
Ralf Baechle [Sat, 14 Jul 2012 07:22:05 +0000 (09:22 +0200)]
MIPS: O32 / 32-bit: Always copy 4 stack arguments.

This gets us rid of the hard to maintain table of the number of syscall
arguments and paves the way for further restructuring of the syscall
code.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: Provide arch_syscall_addr.
Ralf Baechle [Fri, 13 Jul 2012 21:38:17 +0000 (23:38 +0200)]
MIPS: Provide arch_syscall_addr.

The generic version is wrong for MIPS.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: N32: Delete unused re-definition of SIGILL.
Ralf Baechle [Fri, 13 Jul 2012 19:16:37 +0000 (21:16 +0200)]
MIPS: N32: Delete unused re-definition of SIGILL.

Originally and unnecessarilly added in
dd8c35f40cda31dc8c027a62b73301a310b8b529 (lmo) [N32 ...]

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: N32: Kill definition PT_TRACESYS for good.
Ralf Baechle [Fri, 13 Jul 2012 19:01:12 +0000 (21:01 +0200)]
MIPS: N32: Kill definition PT_TRACESYS for good.

Originally killed in 75ddbae069832b2ef15fb9678347ce7f5fbbbf95 (lmo) [Merge
with Linux 2.5.3.] then unnecessarily added back in
dd8c35f40cda31dc8c027a62b73301a310b8b529 (lmo) [N32 ...]  This predates
Linus' git history ...

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: 32-bit: Remove unused gas macros fifty and mille.
Ralf Baechle [Fri, 13 Jul 2012 11:36:40 +0000 (13:36 +0200)]
MIPS: 32-bit: Remove unused gas macros fifty and mille.

These are a leftover of the IRIX compat code which was removed in
2957c9e61ee9c37e7ebf2c8acab03e073fe942fd (kernel.org) rsp.
b934da913f236bca00c41d9e386e980586000461 (lmo) [[MIPS] IRIX: Goodbye
and thanks for all the fish].

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: Enable entries for SIGSYS in struct siginfo.
Ralf Baechle [Thu, 12 Jul 2012 15:13:15 +0000 (17:13 +0200)]
MIPS: Enable entries for SIGSYS in struct siginfo.

This is necessary because MIPS doesn't use HAVE_ARCH_SIGINFO_T for
historical reasons.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: 64-bit: Mark native syscall table as data object.
Ralf Baechle [Thu, 12 Jul 2012 12:06:46 +0000 (14:06 +0200)]
MIPS: 64-bit: Mark native syscall table as data object.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: compat: Mark N32 syscall table as data object.
Ralf Baechle [Thu, 12 Jul 2012 12:02:41 +0000 (14:02 +0200)]
MIPS: compat: Mark N32 syscall table as data object.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: compat: Export O32 syscall table and rename to avoid duplicate symbol.
Ralf Baechle [Thu, 12 Jul 2012 12:01:31 +0000 (14:01 +0200)]
MIPS: compat: Export O32 syscall table and rename to avoid duplicate symbol.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agonet: netprio: fix cgrp create and write priomap race
John Fastabend [Tue, 14 Aug 2012 12:34:35 +0000 (12:34 +0000)]
net: netprio: fix cgrp create and write priomap race

A race exists where creating cgroups and also updating the priomap
may result in losing a priomap update. This is because priomap
writers are not protected by rtnl_lock.

Move priority writer into rtnl_lock()/rtnl_unlock().

CC: Neil Horman <nhorman@tuxdriver.com>
Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: netprio: fd passed in SCM_RIGHTS datagram not set correctly
John Fastabend [Tue, 14 Aug 2012 12:34:30 +0000 (12:34 +0000)]
net: netprio: fd passed in SCM_RIGHTS datagram not set correctly

A socket fd passed in a SCM_RIGHTS datagram was not getting
updated with the new tasks cgrp prioidx. This leaves IO on
the socket tagged with the old tasks priority.

To fix this add a check in the scm recvmsg path to update the
sock cgrp prioidx with the new tasks value.

Thanks to Al Viro for catching this.

CC: Neil Horman <nhorman@tuxdriver.com>
Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: netprio: fix files lock and remove useless d_path bits
John Fastabend [Tue, 14 Aug 2012 12:34:24 +0000 (12:34 +0000)]
net: netprio: fix files lock and remove useless d_path bits

Add lock to prevent a race with a file closing and also remove
useless and ugly sscanf code. The extra code was never needed
and the case it supposedly protected against is in fact handled
correctly by sock_from_file as pointed out by Al Viro.

CC: Neil Horman <nhorman@tuxdriver.com>
Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoact_mirred: do not drop packets when fails to mirror it
Jason Wang [Wed, 15 Aug 2012 20:44:27 +0000 (20:44 +0000)]
act_mirred: do not drop packets when fails to mirror it

We drop packet unconditionally when we fail to mirror it. This is not intended
in some cases. Consdier for kvm guest, we may mirror the traffic of the bridge
to a tap device used by a VM. When kernel fails to mirror the packet in
conditions such as when qemu crashes or stop polling the tap, it's hard for the
management software to detect such condition and clean the the mirroring
before. This would lead all packets to the bridge to be dropped and break the
netowrk of other virtual machines.

To solve the issue, the patch does not drop packets when kernel fails to mirror
it, and only drop the redirected packets.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoLinux 3.6-rc2 v3.6-rc2
Linus Torvalds [Thu, 16 Aug 2012 21:51:24 +0000 (14:51 -0700)]
Linux 3.6-rc2

12 years agoMerge tag 'v3.6-rc1-iio-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Thu, 16 Aug 2012 21:17:08 +0000 (14:17 -0700)]
Merge tag 'v3.6-rc1-iio-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus

IIO fixes for v3.6-rc1

These mostly consist of fixes from Lars-Peter Clausen that were
the first part of a large series reworking the drivers concerned.
Turns out these drivers had quite a wealth of minor bugs.

Also here are some build warning fixes for lm3533-als and
adjd_s111 (both new drives in this cycle).
Final elements are a a div factor overflow and a warning
related fix in a couple of Analog Devices drivers.

All in all nothing major, but a worthwhile bunch of short
fixes.

12 years ago1-Wire: Add support for the maxim ds1825 temperature sensor
Raphael Assenat [Thu, 16 Aug 2012 16:56:40 +0000 (12:56 -0400)]
1-Wire: Add support for the maxim ds1825 temperature sensor

This patch adds support for maxim ds1825 based 1-wire temperature sensors.

Signed-off-by: Raphael Assenat <raph@8d.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoti-st: Fix check for pdata->chip_awake function pointer
Matthias Kaehlcke [Thu, 2 Aug 2012 20:17:48 +0000 (22:17 +0200)]
ti-st: Fix check for pdata->chip_awake function pointer

ll_device_want_to_wakeup(): Fix the NULL pointer check on pdata->chip_awake,
which is performed on the wrong function pointer

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio: lm3533-als: Fix build warnings
Axel Lin [Thu, 2 Aug 2012 10:10:00 +0000 (11:10 +0100)]
iio: lm3533-als: Fix build warnings

Fix below build warnings:
  CC [M]  drivers/iio/light/lm3533-als.o
drivers/iio/light/lm3533-als.c:667:8: warning: initialization from incompatible pointer type [enabled by default]
drivers/iio/light/lm3533-als.c:667:8: warning: (near initialization for 'dev_attr_in_illuminance0_thresh_either_en.show') [enabled by default]
drivers/iio/light/lm3533-als.c:667:8: warning: initialization from incompatible pointer type [enabled by default]
drivers/iio/light/lm3533-als.c:667:8: warning: (near initialization for 'dev_attr_in_illuminance0_thresh_either_en.store') [enabled by default]

Signed-off-by: Axel Lin <axel.lin@gmail.com>
12 years agostaging:iio:ad7780: Mark channels as unsigned
Lars-Peter Clausen [Fri, 10 Aug 2012 16:36:00 +0000 (17:36 +0100)]
staging:iio:ad7780: Mark channels as unsigned

The values reported by the AD7780 are unsigned with a binary offset:

0x000000 is negative fullscale
0x800000 is zeroscale
0xffffff is positive fullscale

So mark the channel in the channel spec as unsigned rather than signed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
12 years agostaging:iio:ad7192: Report offset and scale for temperature channel
Lars-Peter Clausen [Fri, 10 Aug 2012 16:36:00 +0000 (17:36 +0100)]
staging:iio:ad7192: Report offset and scale for temperature channel

The temperature channel reports values in degree Kelvin with sensitivity of 5630
codes per degree. If the chip is configured in bipolar mode there is an
additional binary offset of 0x800000 and the sensitivity is divided by two.

Currently the driver does the mapping from the raw value to degree Celsius when
doing a manual conversion. This has several disadvantages, the major one being
that it does not work for buffered mode, also by doing the division by the
sensitivity in the driver the precession of the reported value is needlessly
reduced.

Furthermore the current calculation only works in bipolar mode and the current
scale is of by a factor of 1000.

This patch modifies the driver to report correct offset and scale values in
both unipolar and bipolar mode and to report the raw temperature value
for manual conversions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
12 years agostaging:iio:ad7192: Report channel offset
Lars-Peter Clausen [Fri, 10 Aug 2012 16:36:00 +0000 (17:36 +0100)]
staging:iio:ad7192: Report channel offset

In bipolar mode there is a a binary offset of 2**(N-1) (with N being the number
of bits) on the reported value. Currently this value is subtracted when doing a
manual read. While this works for manual channel readings it does not work for
buffered mode. So report the offset in the channels offset property, which will
work in both modes.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
12 years agostaging:iio:ad7192: Mark channels as unsigned
Lars-Peter Clausen [Fri, 10 Aug 2012 16:36:00 +0000 (17:36 +0100)]
staging:iio:ad7192: Mark channels as unsigned

The values reported by the AD7793 are unsigned.
In uniploar mode:
0x000000 is zeroscale
0xffffff is fullscale
In bipolar mode:
0x000000 is negative fullscale
0x800000 is zeroscale
0xffffff is positive fullscale

In bipolar mode there is a binary offset, but the values are still unsigned.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
12 years agostaging:iio:ad7192: Fix setting ACX
Lars-Peter Clausen [Fri, 10 Aug 2012 16:36:00 +0000 (17:36 +0100)]
staging:iio:ad7192: Fix setting ACX

Write to the correct register when setting the ACX bit.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
12 years agostaging:iio:ad7192: Add missing break in switch statement
Lars-Peter Clausen [Fri, 10 Aug 2012 16:36:00 +0000 (17:36 +0100)]
staging:iio:ad7192: Add missing break in switch statement

Without the break statement we fall right through to the default case and return
an error value.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
12 years agostaging:iio:ad7793: Fix internal reference value
Lars-Peter Clausen [Fri, 10 Aug 2012 16:36:00 +0000 (17:36 +0100)]
staging:iio:ad7793: Fix internal reference value

The internal reference for the ad7793 and similar is 1.17V

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
12 years agostaging:iio:ad7793: Follow new IIO naming spec
Lars-Peter Clausen [Fri, 10 Aug 2012 16:36:00 +0000 (17:36 +0100)]
staging:iio:ad7793: Follow new IIO naming spec

Make the "in-in_scale_available" attribute follow the new naming spec and
rename it to "in_voltage-voltage_scale_available".

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
12 years agostaging:iio:ad7793: Fix temperature scale and offset
Lars-Peter Clausen [Fri, 10 Aug 2012 16:36:00 +0000 (17:36 +0100)]
staging:iio:ad7793: Fix temperature scale and offset

The temperature channel uses the internal 1.17V reference with 0.81 mv/C. The
reported temperature is in Kevlin, so we need to add the Kelvin to Celcius
offset when reporting the offset for the temperature channel.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
12 years agostaging:iio:ad7793: Report channel offset
Lars-Peter Clausen [Fri, 10 Aug 2012 16:36:00 +0000 (17:36 +0100)]
staging:iio:ad7793: Report channel offset

In bipolar mode there is a a binary offset of 2**(N-1) (with N being the number
of bits) on the reported value. Currently this value is subtracted when doing a
manual read. While this works for manual channel readings it does not work for
buffered mode. So report the offset in the channels offset property, which will
work in both modes.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
12 years agostaging:iio:ad7793: Mark channels as unsigned
Lars-Peter Clausen [Fri, 10 Aug 2012 16:36:00 +0000 (17:36 +0100)]
staging:iio:ad7793: Mark channels as unsigned

The values reported by the AD7793 are unsigned.
In uniploar mode:
0x000000 is zeroscale
0xffffff is fullscale
In bipolar mode:
0x000000 is negative fullscale
0x800000 is zeroscale
0xffffff is positive fullscale

In bipolar mode there is a binary offset, but the values are still unsigned.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
12 years agostaging:iio:ad7793: Add missing break in switch statement
Lars-Peter Clausen [Fri, 10 Aug 2012 16:36:00 +0000 (17:36 +0100)]
staging:iio:ad7793: Add missing break in switch statement

Without the break statement we fall right through to the default case and return
an error value.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
12 years agoiio/adjd_s311: Fix potential memory leak in adjd_s311_update_scan_mode()
Alexey Khoroshilov [Wed, 8 Aug 2012 09:58:00 +0000 (10:58 +0100)]
iio/adjd_s311: Fix potential memory leak in adjd_s311_update_scan_mode()

Do not leak memory by updating pointer with potentially NULL realloc return value.
There is no need to preserve data in the buffer,
so replace krealloc() by kfree()-kmalloc() pair.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
12 years agoiio: frequency: ADF4350: Fix potential reference div factor overflow.
Michael Hennerich [Fri, 20 Jul 2012 08:31:00 +0000 (09:31 +0100)]
iio: frequency: ADF4350: Fix potential reference div factor overflow.

With small channel spacing values and high reference frequencies it is
possible to exceed the range of the 10-bit counter.
Workaround by checking the range and widening some constrains.

We don't use the REG1_PHASE value in this case the datasheet recommends to set
it to 1 if not used.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
12 years agoiio: staging: ad7298_ring: Fix maybe-uninitialized warning
Michael Hennerich [Mon, 16 Jul 2012 08:42:00 +0000 (09:42 +0100)]
iio: staging: ad7298_ring: Fix maybe-uninitialized warning

drivers/staging/iio/adc/ad7298_ring.c:97:37: warning: 'time_ns' may
be used uninitialized in this function [-Wmaybe-uninitialized]

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
12 years agopmac_zilog,kdb: Fix console poll hook to return instead of loop
Jason Wessel [Sun, 12 Aug 2012 12:16:43 +0000 (07:16 -0500)]
pmac_zilog,kdb: Fix console poll hook to return instead of loop

kdb <-> kgdb transitioning does not work properly with this UART
driver because the get character routine loops indefinitely as opposed
to returning NO_POLL_CHAR per the expectation of the KDB I/O driver
API.

The symptom is a kernel hang when trying to switch debug modes.

Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoserial: mxs-auart: fix the wrong RTS hardware flow control
Huang Shijie [Wed, 8 Aug 2012 02:37:59 +0000 (10:37 +0800)]
serial: mxs-auart: fix the wrong RTS hardware flow control

Without checking if the auart supports the hardware flow control or not,
the old mxs_auart_set_mctrl() asserted the RTS pin blindly.

This will causes the auart receives wrong data in the following case:
   The far-end has already started the write operation, and wait for
the auart asserts the RTS pin. Then the auart starts the read operation,
but mxs_auart_set_mctrl() may be called before we set the RTSCTS in the
mxs_auart_settermios(). So the RTS pin is asserted in a wrong situation,
and we get the wrong data in the end.

This bug has been catched when I connect the mx23(DTE) to the mx53(DCE).

This patch also replaces the AUART_CTRL2_RTS with AUART_CTRL2_RTSEN.
We should use the real the hardware flow control, not the software-controled
hardware flow control.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoautofs4 - fix get_next_positive_subdir()
Ian Kent [Mon, 6 Aug 2012 01:37:47 +0000 (09:37 +0800)]
autofs4 - fix get_next_positive_subdir()

Following a report of a crash during an automount expire I found that
the locking in fs/autofs4/expire.c:get_next_positive_subdir() was wrong.
Not only is the locking wrong but the function is more complex than it
needs to be.

The function is meant to calculate (and dget) the next entry in the list
of directories contained in the root of an autofs mount point (an autofs
indirect mount to be precise). The main problem was that the d_lock of
the owner of the list was not being taken when walking the list, which
lead to list corruption under load. The only other lock that needs to
be taken is against the next dentry candidate so it can be checked for
usability.

Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge tag 'vfio-for-v3.6-rc1' of git://github.com/awilliam/linux-vfio
Linus Torvalds [Thu, 16 Aug 2012 18:47:42 +0000 (11:47 -0700)]
Merge tag 'vfio-for-v3.6-rc1' of git://github.com/awilliam/linux-vfio

Pull VFIO fix from Alex Williamson:
 "Just a trivial patch to include vfio.h in the installed headers so we
  can complete userspace integration into QEMU."

* tag 'vfio-for-v3.6-rc1' of git://github.com/awilliam/linux-vfio:
  vfio: Include vfio.h in installed headers

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi...
Linus Torvalds [Thu, 16 Aug 2012 18:46:31 +0000 (11:46 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse

Pull fuse updates from Miklos Szeredi.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
  fuse: verify all ioctl retry iov elements
  fuse: add missing INIT flag descriptions
  fuse: add missing INIT flags
  fuse: update attributes on aio_read
  fuse: invalidate inode mapping if mtime changes
  fuse: add FUSE_AUTO_INVAL_DATA init flag

12 years agoMerge tag 'stable/for-linus-3.6-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 16 Aug 2012 18:31:59 +0000 (11:31 -0700)]
Merge tag 'stable/for-linus-3.6-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen

Pull Xen fix from Konrad Rzeszutek Wilk:
 "Way back in v3.5 we added a mechanism to populate back pages that were
  released (they overlapped with MMIO regions), but neglected to reserve
  the proper amount of virtual space for extend_brk to work properly.

  Coincidentally some other commit aligned the _brk space to larger area
  so I didn't trigger this until it was run on a machine with more than
  2GB of MMIO space."

 * On machines with large MMIO/PCI E820 spaces we fail to boot b/c
   we failed to pre-allocate large enough virtual space for extend_brk.

* tag 'stable/for-linus-3.6-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen/p2m: Reserve 8MB of _brk space for P2M leafs when populating back.

12 years agoMerge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh
Linus Torvalds [Thu, 16 Aug 2012 18:31:29 +0000 (11:31 -0700)]
Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh

Pull SuperH fixes from Paul Mundt.

* tag 'sh-for-linus' of git://github.com/pmundt/linux-sh:
  sh: intc: Handle domain association for sparseirq pre-allocated vectors.
  sh: sh7269: Fix LCD pinmux
  sh: dma: fix request_irq usage

12 years agoMAINTAINERS: update address for Dan Williams
Dan Williams [Thu, 16 Aug 2012 02:20:02 +0000 (19:20 -0700)]
MAINTAINERS: update address for Dan Williams

Moved to djbw@fb.com

Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Dan Williams <djbw@fb.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agostaging: comedi: usbduxfast: Declare MODULE_FIRMWARE usage
Tim Gardner [Thu, 16 Aug 2012 17:09:28 +0000 (11:09 -0600)]
staging: comedi: usbduxfast: Declare MODULE_FIRMWARE usage

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: usbdux: Declare MODULE_FIRMWARE usage
Tim Gardner [Thu, 16 Aug 2012 17:15:37 +0000 (11:15 -0600)]
staging: comedi: usbdux: Declare MODULE_FIRMWARE usage

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: usbduxsigma: Declare MODULE_FIRMWARE usage
Tim Gardner [Thu, 16 Aug 2012 17:19:11 +0000 (11:19 -0600)]
staging: comedi: usbduxsigma: Declare MODULE_FIRMWARE usage

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Cc: Bernd Porr <berndporr@f2s.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoscripts/decodecode: Fixup trapping instruction marker
Borislav Petkov [Wed, 15 Aug 2012 11:00:51 +0000 (13:00 +0200)]
scripts/decodecode: Fixup trapping instruction marker

When dumping "Code: " sections from an oops, the trapping instruction
%rip points to can be a string copy

  2b:*  f3 a5                   rep movsl %ds:(%rsi),%es:(%rdi)

and the line contain a bunch of ":".  Current "cut" selects only the and
the second field output looks funnily overlaid this:

  2b:*  f3 a5                   rep movsl %ds     <-- trapping instruction:(%rsi),%es:(%rdi

Fix this by selecting the remaining fields too.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma
Linus Torvalds [Thu, 16 Aug 2012 18:13:16 +0000 (11:13 -0700)]
Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma

Pull two slave-dmaengine fixes from Vinod Koul:
 "One fixes the correct use of clock API in imx driver and the other
  enables clock for tegra driver, which is used for other tegra driver
  conversion to dmanegine in -next."

* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
  dma: tegra: enable/disable dma clock
  dma: imx-dma: Fix kernel crash due to missing clock conversion

12 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Thu, 16 Aug 2012 18:08:32 +0000 (11:08 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull more drm fixes from Dave Airlie:
 "Just some intel and nouveau ones this time, intel has more edp panel
  fixes for macbooks and nouveau has a suspend/resume regression fix in
  there."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/i915: Apply post-sync write for pipe control invalidates
  drm/i915: reorder edp disabling to fix ivb MacBook Air
  drm/nv86/fifo: suspend fix
  drm/nouveau: disable copy engine on NVAF
  nouveau: fixup scanout enable in nvc0_pm
  drm/nouveau/aux: mask off higher bits of auxch index in i2c table entry
  drm/nvd0/disp: mask off high 16 bit of negative cursor x-coordinate
  drm/i915: ensure i2c adapter is all set before adding it
  drm/i915: ignore eDP bpc settings from vbt
  drm/i915: Fix blank panel at reopening lid
  drm/nve0/fifo: add support for the flip completion swmthd

12 years agomei: add mei_quirk_probe function
Tomas Winkler [Mon, 6 Aug 2012 12:23:55 +0000 (15:23 +0300)]
mei: add mei_quirk_probe function

The main purpose of this function is to exclude ME devices
without support for MEI/HECI interface from binding

Currently affected systems are C600/X79 based servers
that expose PCI device even though it doesn't supported ME Interface.
MEI driver accessing such nonfunctional device can corrupt
the system.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoextcon: extcon_gpio: Replace gpio_request_one by devm_gpio_request_one
Axel Lin [Tue, 24 Jul 2012 01:26:57 +0000 (09:26 +0800)]
extcon: extcon_gpio: Replace gpio_request_one by devm_gpio_request_one

commit 01eaf24 "extcon: Convert extcon_gpio to devm_gpio_request_one"
missed the replacement for devm_gpio_request_one. fix it.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agodrivers-core: make structured logging play nice with dynamic-debug
Jim Cromie [Thu, 19 Jul 2012 19:46:21 +0000 (13:46 -0600)]
drivers-core: make structured logging play nice with dynamic-debug

commit c4e00daaa96d3a0786f1f4fe6456281c60ef9a16 changed __dev_printk
in a way that broke dynamic-debug's ability to control the dynamic
prefix of dev_dbg(dev,..), but not dev_dbg(NULL,..) or pr_debug(..),
which is why it wasnt noticed sooner.

When dev==NULL, __dev_printk() just calls printk(), which just works.
But otherwise, it assumed that level was always a string like "<L>"
and just plucked out the 'L', ignoring the rest.  However,
dynamic_emit_prefix() adds "[tid] module:func:line:" to the string,
those additions all got lost.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Acked-by: Jason Baron <jbaron@redhat.com>
Cc: stable <stable@vger.kernel.org>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: qcserial: fix port handling on Gobi 1K and 2K+
Dan Williams [Mon, 23 Jul 2012 19:26:07 +0000 (14:26 -0500)]
USB: qcserial: fix port handling on Gobi 1K and 2K+

Bjorn's latest patchset does break Gobi 1K and 2K because on both
devices as it claims usb interface 0.  That's because usbif 0 is not
handled in the switch statement, and thus the if0 gets claimed when it
should not.  So let's just make things even simpler yet, and handle both
the 1K and 2K+ cases separately.  This patch should not affect the new
Sierra device support, because those devices are matched via
interface-specific matching and thus should never hit the composite
code.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Tested-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agomei: fix device stall after wd is stopped
Tomas Winkler [Thu, 16 Aug 2012 13:25:33 +0000 (16:25 +0300)]
mei: fix device stall after wd is stopped

After watchdog was disabled the driver would stall
due to wrong calculation of credits reduction

The cat&paste bug was introduced in the commit
7bdf72d3d8059a50214069ea4b87c2174645f40f
mei: introduce mei_data2slots wrapper

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoALSA: hda - Don't send invalid volume knob command on IDT 92hd75bxx
David Henningsson [Thu, 16 Aug 2012 12:11:09 +0000 (14:11 +0200)]
ALSA: hda - Don't send invalid volume knob command on IDT 92hd75bxx

Instead of blindly initializing a volume knob widget, first check
that there actually is a volume knob widget.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: usb-audio: Fix scheduling-while-atomic bug in PCM capture stream
Takashi Iwai [Wed, 15 Aug 2012 10:32:00 +0000 (12:32 +0200)]
ALSA: usb-audio: Fix scheduling-while-atomic bug in PCM capture stream

A PCM capture stream on usb-audio causes a scheduling-while-atomic
BUG, as reported in the bugzilla entry below.  It's because
snd_usb_endpoint_start() is called at first at trigger START for a
capture stream, and this function contains the left-over EP
deactivation codes.  The problem doesn't happen for a playback stream
because the function is called at PCM prepare time, which can sleep.

This patch fixes the BUG by moving the EP deactivation code into the
PCM prepare callback.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=46011
Cc: <stable@vger.kernel.org> [v3.5+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agonet: fix info leak in compat dev_ifconf()
Mathias Krause [Wed, 15 Aug 2012 11:31:57 +0000 (11:31 +0000)]
net: fix info leak in compat dev_ifconf()

The implementation of dev_ifconf() for the compat ioctl interface uses
an intermediate ifc structure allocated in userland for the duration of
the syscall. Though, it fails to initialize the padding bytes inserted
for alignment and that for leaks four bytes of kernel stack. Add an
explicit memset(0) before filling the structure to avoid the info leak.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipvs: fix info leak in getsockopt(IP_VS_SO_GET_TIMEOUT)
Mathias Krause [Wed, 15 Aug 2012 11:31:56 +0000 (11:31 +0000)]
ipvs: fix info leak in getsockopt(IP_VS_SO_GET_TIMEOUT)

If at least one of CONFIG_IP_VS_PROTO_TCP or CONFIG_IP_VS_PROTO_UDP is
not set, __ip_vs_get_timeouts() does not fully initialize the structure
that gets copied to userland and that for leaks up to 12 bytes of kernel
stack. Add an explicit memset(0) before passing the structure to
__ip_vs_get_timeouts() to avoid the info leak.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Wensong Zhang <wensong@linux-vs.org>
Cc: Simon Horman <horms@verge.net.au>
Cc: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodccp: fix info leak via getsockopt(DCCP_SOCKOPT_CCID_TX_INFO)
Mathias Krause [Wed, 15 Aug 2012 11:31:55 +0000 (11:31 +0000)]
dccp: fix info leak via getsockopt(DCCP_SOCKOPT_CCID_TX_INFO)

The CCID3 code fails to initialize the trailing padding bytes of struct
tfrc_tx_info added for alignment on 64 bit architectures. It that for
potentially leaks four bytes kernel stack via the getsockopt() syscall.
Add an explicit memset(0) before filling the structure to avoid the
info leak.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodccp: check ccid before dereferencing
Mathias Krause [Wed, 15 Aug 2012 11:31:54 +0000 (11:31 +0000)]
dccp: check ccid before dereferencing

ccid_hc_rx_getsockopt() and ccid_hc_tx_getsockopt() might be called with
a NULL ccid pointer leading to a NULL pointer dereference. This could
lead to a privilege escalation if the attacker is able to map page 0 and
prepare it with a fake ccid_ops pointer.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Cc: stable@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agollc: fix info leak via getsockname()
Mathias Krause [Wed, 15 Aug 2012 11:31:53 +0000 (11:31 +0000)]
llc: fix info leak via getsockname()

The LLC code wrongly returns 0, i.e. "success", when the socket is
zapped. Together with the uninitialized uaddrlen pointer argument from
sys_getsockname this leads to an arbitrary memory leak of up to 128
bytes kernel stack via the getsockname() syscall.

Return an error instead when the socket is zapped to prevent the info
leak. Also remove the unnecessary memset(0). We don't directly write to
the memory pointed by uaddr but memcpy() a local structure at the end of
the function that is properly initialized.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agol2tp: fix info leak via getsockname()
Mathias Krause [Wed, 15 Aug 2012 11:31:52 +0000 (11:31 +0000)]
l2tp: fix info leak via getsockname()

The L2TP code for IPv6 fails to initialize the l2tp_unused member of
struct sockaddr_l2tpip6 and that for leaks two bytes kernel stack via
the getsockname() syscall. Initialize l2tp_unused with 0 to avoid the
info leak.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoBluetooth: L2CAP - Fix info leak via getsockname()
Mathias Krause [Wed, 15 Aug 2012 11:31:51 +0000 (11:31 +0000)]
Bluetooth: L2CAP - Fix info leak via getsockname()

The L2CAP code fails to initialize the l2_bdaddr_type member of struct
sockaddr_l2 and the padding byte added for alignment. It that for leaks
two bytes kernel stack via the getsockname() syscall. Add an explicit
memset(0) before filling the structure to avoid the info leak.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoBluetooth: RFCOMM - Fix info leak via getsockname()
Mathias Krause [Wed, 15 Aug 2012 11:31:50 +0000 (11:31 +0000)]
Bluetooth: RFCOMM - Fix info leak via getsockname()

The RFCOMM code fails to initialize the trailing padding byte of struct
sockaddr_rc added for alignment. It that for leaks one byte kernel stack
via the getsockname() syscall. Add an explicit memset(0) before filling
the structure to avoid the info leak.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoBluetooth: RFCOMM - Fix info leak in ioctl(RFCOMMGETDEVLIST)
Mathias Krause [Wed, 15 Aug 2012 11:31:49 +0000 (11:31 +0000)]
Bluetooth: RFCOMM - Fix info leak in ioctl(RFCOMMGETDEVLIST)

The RFCOMM code fails to initialize the two padding bytes of struct
rfcomm_dev_list_req inserted for alignment before copying it to
userland. Additionally there are two padding bytes in each instance of
struct rfcomm_dev_info. The ioctl() that for disclosures two bytes plus
dev_num times two bytes uninitialized kernel heap memory.

Allocate the memory using kzalloc() to fix this issue.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoBluetooth: RFCOMM - Fix info leak in getsockopt(BT_SECURITY)
Mathias Krause [Wed, 15 Aug 2012 11:31:48 +0000 (11:31 +0000)]
Bluetooth: RFCOMM - Fix info leak in getsockopt(BT_SECURITY)

The RFCOMM code fails to initialize the key_size member of struct
bt_security before copying it to userland -- that for leaking one
byte kernel stack. Initialize key_size with 0 to avoid the info
leak.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoBluetooth: HCI - Fix info leak via getsockname()
Mathias Krause [Wed, 15 Aug 2012 11:31:47 +0000 (11:31 +0000)]
Bluetooth: HCI - Fix info leak via getsockname()

The HCI code fails to initialize the hci_channel member of struct
sockaddr_hci and that for leaks two bytes kernel stack via the
getsockname() syscall. Initialize hci_channel with 0 to avoid the
info leak.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoBluetooth: HCI - Fix info leak in getsockopt(HCI_FILTER)
Mathias Krause [Wed, 15 Aug 2012 11:31:46 +0000 (11:31 +0000)]
Bluetooth: HCI - Fix info leak in getsockopt(HCI_FILTER)

The HCI code fails to initialize the two padding bytes of struct
hci_ufilter before copying it to userland -- that for leaking two
bytes kernel stack. Add an explicit memset(0) before filling the
structure to avoid the info leak.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatm: fix info leak via getsockname()
Mathias Krause [Wed, 15 Aug 2012 11:31:45 +0000 (11:31 +0000)]
atm: fix info leak via getsockname()

The ATM code fails to initialize the two padding bytes of struct
sockaddr_atmpvc inserted for alignment. Add an explicit memset(0)
before filling the structure to avoid the info leak.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>