Barry Song [Fri, 16 Oct 2009 10:13:38 +0000 (18:13 +0800)]
ASoC: Fix possible codec_dai->ops NULL pointer problems
Some codec DAIs like stac9766, wm9712, wm9713, ad1980 don't register themselves
then it loses to the chance to be given a null_dai_ops in snd_soc_register_dai
if they have no ops. When functions like soc_pcm_open, soc_pcm_hw_params etc.
access the ops field in these DAIs, panic will happen.
Signed-off-by: Barry Song <21cnbao@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Eero Nurkkala [Mon, 12 Oct 2009 05:41:59 +0000 (08:41 +0300)]
ASoC: Serialize access to dapm_power_widgets()
Access to damp_power_widgets() is assumed to be single-threaded.
Concurrent accesses to dapm_power_widgets() may result in
unpredictable behavior.
Calls from:
close_delayed_work()
soc_codec_close()
soc_pcm_prepare()
soc_suspend()
soc_resume_deferred()
to snd_soc_dapm_stream_event() do not have the codec->mutex
taken to cover the call to dapm_power_widgets(). Thus, take
the mutex in these paths also to assure single-threaded use
of dapm_power_widgets().
Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Linus Torvalds [Mon, 5 Oct 2009 00:12:30 +0000 (17:12 -0700)]
Linux 2.6.32-rc3
I'm skipping -rc2 because the -rc1 Makefile mistakenly said -rc2, so in
order to avoid confusion, I'm jumping from -rc1 to -rc3. That way, when
'uname' (or an oops report) says 2.6.32-rc2, there's no confusion about
whether people perhaps meant -rc1 or -rc2.
Linus Torvalds [Sun, 4 Oct 2009 22:03:00 +0000 (15:03 -0700)]
Merge branch 'acpi-pad' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'acpi-pad' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
acpi_pad: build only on X86
ACPI: create Processor Aggregator Device driver
Linus Torvalds [Sun, 4 Oct 2009 21:59:53 +0000 (14:59 -0700)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
ACPI: EC: Don't parse DSDT for EC early init on Compal
ACPI: EC: Rewrite DMI checks
ACPI: dock: fix "sibiling" typo
ACPI: kill overly verbose "throttling states" log messages
ACPI: Fix bound checks for copy_from_user in the acpi /proc code
ACPI: fix bus scanning memory leaks
ACPI: EC: Restart command even if no interrupts from EC
sony-laptop: Don't unregister the SPIC driver if it wasn't registered
sony-laptop: remove _INI call at init time
sony-laptop: SPIC unset IRQF_SHARED, set IRQF_DISABLED
sony-laptop: remove device_ctrl and the SPIC mini drivers
If i2c device probing fails, then there is no driver to dereference
after calling i2c_new_device(). Stop assuming that probing will always
succeed, to avoid NULL pointer dereferences. We have an easier access
to the driver anyway.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Tim Shepard <shep@alum.mit.edu> Cc: Colin Leroy <colin@colino.net>
Jean Delvare [Sun, 4 Oct 2009 20:53:45 +0000 (22:53 +0200)]
i2c: Hide probe errors caused by ACPI resource conflicts
When an ACPI resource conflict is detected, error messages are already
printed by ACPI. There's no point in causing the driver core to print
more error messages, so return one of the error codes for which no
message is printed.
This fixes bug #14293:
http://bugzilla.kernel.org/show_bug.cgi?id=14293
Jean Delvare [Sun, 4 Oct 2009 20:53:44 +0000 (22:53 +0200)]
mfd: AB3100 drop unused module parameters
The I2C_CLIENT_INSMOD_1 macro is only useful for i2c drivers which
implement device detection. The ab3100 driver doesn't, so there is no
point in calling it.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Cc: Samuel Ortiz <sameo@linux.intel.com>
Jean Delvare [Sun, 4 Oct 2009 20:53:43 +0000 (22:53 +0200)]
Staging: IIO: tsl2561: Drop unused module parameters
The I2C_CLIENT_INSMOD macro is only useful for i2c drivers which
implement device detection. The tsl2561 driver doesn't, so there
is no point in calling it.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Jonathan Cameron <jic23@cam.ac.uk>
Jean Delvare [Sun, 4 Oct 2009 20:53:43 +0000 (22:53 +0200)]
leds: leds-pca9532 - Drop unused module parameters
The I2C_CLIENT_INSMOD_1 macro is only useful for i2c drivers which
implement device detection. The leds-pca9532 driver doesn't, so there
is no point in calling it.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Riku Voipio <riku.voipio@iki.fi>
Jean Delvare [Sun, 4 Oct 2009 20:53:42 +0000 (22:53 +0200)]
ltc4215/ltc4245: Discard obsolete detect methods
There is no point in implementing a detect callback for the LTC4215
and LTC4245, as these devices can't be detected. It was there solely
to handle "force" module parameters to instantiate devices, but now
we have a better sysfs interface that can do the same.
So we can get rid of the ugly module parameters and the detect
callbacks. This shrinks the binary module sizes by 36% and 46%,
respectively.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Ira W. Snyder <iws@ovro.caltech.edu>
Jean Delvare [Sun, 4 Oct 2009 20:53:41 +0000 (22:53 +0200)]
ds2482: Discard obsolete detect method
There is no point in implementing a detect callback for the DS2482, as
this device can't be detected. It was there solely to handle "force"
module parameters to instantiate devices, but now we have a better sysfs
interface that can do the same.
So we can get rid of the ugly module parameters and the detect callback.
This shrinks the binary module size by 21%.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Ben Gardner <gardner.ben@gmail.com>
Jean Delvare [Sun, 4 Oct 2009 20:53:41 +0000 (22:53 +0200)]
max6875: Discard obsolete detect method
There is no point in implementing a detect callback for the MAX6875, as
this device can't be detected. It was there solely to handle "force"
module parameters to instantiate devices, but now we have a better sysfs
interface that can do the same.
So we can get rid of the ugly module parameters and the detect callback.
This basically divides the binary module size by 2.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Ben Gardner <gardner.ben@gmail.com>
Jean Delvare [Sun, 4 Oct 2009 20:53:40 +0000 (22:53 +0200)]
i2c: Move misc devices documentation
Some times ago the eeprom and max6875 drivers moved to
drivers/misc/eeprom, but their documentation did not follow. It's
finally time to get rid of Documentation/i2c/chips.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Ben Gardner <gardner.ben@gmail.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Linus Torvalds [Sun, 4 Oct 2009 19:39:14 +0000 (12:39 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: (41 commits)
Revert "Seperate read and write statistics of in_flight requests"
cfq-iosched: don't delay async queue if it hasn't dispatched at all
block: Topology ioctls
cfq-iosched: use assigned slice sync value, not default
cfq-iosched: rename 'desktop' sysfs entry to 'low_latency'
cfq-iosched: implement slower async initiate and queue ramp up
cfq-iosched: delay async IO dispatch, if sync IO was just done
cfq-iosched: add a knob for desktop interactiveness
Add a tracepoint for block request remapping
block: allow large discard requests
block: use normal I/O path for discard requests
swapfile: avoid NULL pointer dereference in swapon when s_bdev is NULL
fs/bio.c: move EXPORT* macros to line after function
Add missing blk_trace_remove_sysfs to be in pair with blk_trace_init_sysfs
cciss: fix build when !PROC_FS
block: Do not clamp max_hw_sectors for stacking devices
block: Set max_sectors correctly for stacking devices
cciss: cciss_host_attr_groups should be const
cciss: Dynamically allocate the drive_info_struct for each logical drive.
cciss: Add usage_count attribute to each logical drive in /sys
...
Global values for service time and utilization are garbage. For
interval values, utilization is always 100%, and service time is
higher than normal.
I bisected it down to:
[a9327cac440be4d8333bba975cbbf76045096275] Seperate read and write
statistics of in_flight requests
and verified that reverting just that commit indeed solves the issue
on 2.6.32-rc1."
Jens Axboe [Sun, 4 Oct 2009 18:36:19 +0000 (20:36 +0200)]
cfq-iosched: don't delay async queue if it hasn't dispatched at all
We cannot delay for the first dispatch of the async queue if it
hasn't dispatched at all, since that could present a local user
DoS attack vector using an app that just did slow timed sync reads
while filling memory.
Linus Torvalds [Sun, 4 Oct 2009 04:44:21 +0000 (21:44 -0700)]
tty: Avoid dropping ldisc_mutex over hangup tty re-initialization
A couple of people have hit the WARN_ON() in drivers/char/tty_io.c,
tty_open() that is unhappy about seeing the tty line discipline go away
during the tty hangup. See for example
http://bugzilla.kernel.org/show_bug.cgi?id=14255
and the reason is that we do the tty_ldisc_halt() outside the
ldisc_mutex in order to be able to flush the scheduled work without a
deadlock with vhangup_work.
However, it turns out that we can solve this particular case by
- using "cancel_delayed_work_sync()" in tty_ldisc_halt(), which waits
for just the particular work, rather than synchronizing with any
random outstanding pending work.
This won't deadlock, since the buf.work we synchronize with doesn't
care about the ldisc_mutex, it just flushes the tty ldisc buffers.
- realize that for this particular case, we don't need to wait for any
hangup work, because we are inside the hangup codepaths ourselves.
so as a result we can just drop the flush_scheduled_work() entirely, and
then move the tty_ldisc_halt() call to inside the mutex. That way we
never expose the partially torn down ldisc state to tty_open(), and hold
the ldisc_mutex over the whole sequence.
This patch fixes the m32r SMP kernel after 2.6.27.
A part of the following patch breaks m32r SMP operation.
> m32r: convert to generic helpers for IPI function calls
> commit 7b7426c8a615cf61df9a77b9df7d5b75d91e3fa0
In the above patch, a CALL_FUNC_SINGLE_IPI was newly introduced,
but the its IPI vector number was wrong in the patch code.
The m32r SMP kernel hanged-up during boot operation, because
the CPU_BOOT_IPI was called instead of CALL_FUNC_SINGLE_IPI
(CPU_BOOT_IPI had no side effect at that time because the 2nd
core had already been started up),
as a result, csd_unlock() was not called, then a dead lock
occurred in csd_lock_wait() after the detection of Compact Flash
memory as IDE generic disk.
Hirokazu Takata [Wed, 26 Aug 2009 04:04:33 +0000 (13:04 +0900)]
m32r: define ioread* and iowrite* macros
Define ioread* and iowrite* macros to fix the following build errors:
CC [M] drivers/uio/uio_smx.o
drivers/uio/uio_smx.c: In function 'smx_handler':
drivers/uio/uio_smx.c:31: error: implicit declaration of function 'ioread32'
drivers/uio/uio_smx.c:37: error: implicit declaration of function 'iowrite32'
Linus Torvalds [Sat, 3 Oct 2009 18:24:19 +0000 (11:24 -0700)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
[PATCH] ext4: retry failed direct IO allocations
ext4: Fix build warning in ext4_dirty_inode()
ext4: drop ext4dev compat
ext4: fix a BUG_ON crash by checking that page has buffers attached to it
Jens Axboe [Sat, 3 Oct 2009 14:26:03 +0000 (16:26 +0200)]
cfq-iosched: implement slower async initiate and queue ramp up
This slowly ramps up the async queue depth based on the time
passed since the sync IO, and doesn't allow async at all until
a sync slice period has passed.
Vivek Goyal [Sat, 3 Oct 2009 13:21:27 +0000 (15:21 +0200)]
cfq-iosched: delay async IO dispatch, if sync IO was just done
o Do not allow more than max_dispatch requests from an async queue, if some
sync request has finished recently. This is in the hope that sync activity
is still going on in the system and we might receive a sync request soon.
Most likely from a sync queue which finished a request and we did not enable
idling on it.
ACPI: EC: Don't parse DSDT for EC early init on Compal
Compal DSDT breaks if scanned early, while we need early scan
for almost all ASUS machines. Safest workaround seems to be to
continue do an early scan for all machines, but this Compal model.
http://bugzilla.kernel.org/show_bug.cgi?id=14086
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
I was recently lucky enough to get a 64-CPU system. The processors
actually have T-states, so my kernel log ends up with 64 lines like:
ACPI: Processor [CPU0] (supports xx throttling states)
This is pretty useless clutter because
- this info is already available after boot from
/proc/acpi/processor/CPUnn/throttling
- there's also an ACPI_DEBUG_PRINT() in processor_throttling.c that
gives the same info on boot for anyone who *really* cares.
So just delete the code that prints the throttling states in
processor_core.c.
Signed-off-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
The function sfi_map_memory/sfi_unmap_memory uses
early_ioremap/early_iounmap respectively, which refers to a __init
function. And function sfi_check_table also refers to a __init function
sfi_verify_table. Since the references are valid, so use __ref to get rid
of the warnings.
We were warned by the following warnings:
LD vmlinux.o
MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0xb6ba3a): Section mismatch in reference from
the function sfi_map_memory() to the function
.init.text:early_ioremap()
The function sfi_map_memory() references
the function __init early_ioremap().
This is often because sfi_map_memory lacks a __init
annotation or the annotation of early_ioremap is wrong.
WARNING: vmlinux.o(.text+0xb6bab6): Section mismatch in reference from
the function sfi_unmap_memory() to the function
.init.text:early_iounmap()
The function sfi_unmap_memory() references
the function __init early_iounmap().
This is often because sfi_unmap_memory lacks a __init
annotation or the annotation of early_iounmap is wrong.
WARNING: vmlinux.o(.text+0xb6be30): Section mismatch in reference from
the function sfi_check_table() to the function
.init.text:sfi_verify_table()
The function sfi_check_table() references
the function __init sfi_verify_table().
This is often because sfi_check_table lacks a __init
annotation or the annotation of sfi_verify_table is wrong.
Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
Arjan van de Ven [Sat, 26 Sep 2009 18:50:25 +0000 (20:50 +0200)]
ACPI: Fix bound checks for copy_from_user in the acpi /proc code
The ACPI /proc write() code takes an unsigned length argument like any write()
function, but then assigned it to a *signed* integer called "len".
Only after this is a sanity check for len done to make it not larger than 4.
Due to the type change a len < 0 is in principle also possible; this patch
adds a check for this.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
ARM: 5728/1: Proper prefetch abort handling on ARMv6 and ARMv7
Currently, on ARMv6 and ARMv7, if an application tries to execute
code (or garbage) on non-executable page it hangs. It caused by
incorrect prefetch abort handling. Now every prefetch abort
processes as a translation fault.
To fix this we have to analyze instruction fault status register
to figure out reason why we've got the abort and process it
accordingly.
To make IFSR different from DFSR we set bit 31 which is reserved in
both IFSR and DFSR.
This patch also tries to protect from future hangs on unexpected
exceptions. An application will be killed if unexpected exception
type was received.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
ARM: 5727/1: Pass IFSR register to do_PrefetchAbort()
Instruction fault status register, IFSR, was introduced on ARMv6 to
provide status information about the last insturction fault. It
needed for proper prefetch abort handling.
Now we have three prefetch abort model:
* legacy - for CPUs before ARMv6. They doesn't provide neither
IFSR nor IFAR. We simulate IFSR with section translation fault
status for them to generalize code;
* ARMv6 - provides IFSR, but not IFAR;
* ARMv7 - provides both IFSR and IFAR.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Greg Ungerer [Thu, 1 Oct 2009 23:45:28 +0000 (00:45 +0100)]
ARM: 5740/1: fix valid_phys_addr_range() range check
Commit 1522ac3ec95ff0230e7aa516f86b674fdf72866c
("Fix virtual to physical translation macro corner cases")
breaks the end of memory check in valid_phys_addr_range().
The modified expression results in the apparent /dev/mem size
being 2 bytes smaller than what it actually is.
This patch reworks the expression to correctly check the address,
while maintaining use of a valid address to __pa().
Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
David Brown [Thu, 1 Oct 2009 16:43:29 +0000 (17:43 +0100)]
ARM: 5739/1: ARM: allow empty ATAG_CORE
From: David Brown <davidb@quicinc.com>
The ATAG_CORE is allowed to be empty. Although this is handled
by parse_tag_core(), __vet_atags during startup rejects this tag
unless it contains data. Allow the initial tag to be either the
full size, or empty.
Signed-off-by: David Brown <davidb@quicinc.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
EXPORT_* macros should follow immediately after the closing function
brace line.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Kristoffer Ericson <kristoffer.ericson@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (46 commits)
cnic: Fix NETDEV_UP event processing.
uvesafb/connector: Disallow unpliviged users to send netlink packets
pohmelfs/connector: Disallow unpliviged users to configure pohmelfs
dst/connector: Disallow unpliviged users to configure dst
dm/connector: Only process connector packages from privileged processes
connector: Removed the destruct_data callback since it is always kfree_skb()
connector/dm: Fixed a compilation warning
connector: Provide the sender's credentials to the callback
connector: Keep the skb in cn_callback_data
e1000e/igb/ixgbe: Don't report an error if devices don't support AER
net: Fix wrong sizeof
net: splice() from tcp to pipe should take into account O_NONBLOCK
net: Use sk_mark for routing lookup in more places
sky2: irqname based on pci address
skge: use unique IRQ name
IPv4 TCP fails to send window scale option when window scale is zero
net/ipv4/tcp.c: fix min() type mismatch warning
Kconfig: STRIP: Remove stale bits of STRIP help text
NET: mkiss: Fix typo
tg3: Remove prev_vlan_tag from struct tx_ring_info
...
Jens Axboe [Fri, 2 Oct 2009 17:27:04 +0000 (19:27 +0200)]
cfq-iosched: add a knob for desktop interactiveness
This is basically identical to what Vivek Goyal posted, but combined
into one and labelled 'desktop' instead of 'fairness'. The goal
is to continue to improve on the latency side of things as it relates
to interactiveness, keeping the questionable bits under this sysfs
tunable so it would be easy for throughput-only people to turn off.
Apart from adding the interactive sysfs knob, it also adds the
behavioural change of allowing slice idling even if the hardware
does tagged command queuing.
Michael Chan [Fri, 2 Oct 2009 18:03:28 +0000 (11:03 -0700)]
cnic: Fix NETDEV_UP event processing.
This fixes the problem of not handling the NETDEV_UP event properly
during hot-plug or modprobe of bnx2 after cnic. The handling was
skipped by mistakenly using "else if" to check for the event.
Also update version to 2.0.1.
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Philipp Reisner [Fri, 2 Oct 2009 02:40:07 +0000 (02:40 +0000)]
connector: Removed the destruct_data callback since it is always kfree_skb()
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Acked-by: Lars Ellenberg <lars.ellenberg@linbit.com> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Philipp Reisner [Fri, 2 Oct 2009 02:40:06 +0000 (02:40 +0000)]
connector/dm: Fixed a compilation warning
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Acked-by: Lars Ellenberg <lars.ellenberg@linbit.com> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Philipp Reisner [Fri, 2 Oct 2009 02:40:05 +0000 (02:40 +0000)]
connector: Provide the sender's credentials to the callback
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Acked-by: Lars Ellenberg <lars.ellenberg@linbit.com> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Philipp Reisner [Fri, 2 Oct 2009 02:40:04 +0000 (02:40 +0000)]
connector: Keep the skb in cn_callback_data
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Acked-by: Lars Ellenberg <lars.ellenberg@linbit.com> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Frans Pop [Fri, 2 Oct 2009 17:04:12 +0000 (10:04 -0700)]
e1000e/igb/ixgbe: Don't report an error if devices don't support AER
The only error returned by pci_{en,dis}able_pcie_error_reporting() is
-EIO which simply means that Advanced Error Reporting is not supported.
There is no need to report that, so remove the error check from e1000e,
igb and ixgbe.
Signed-off-by: Frans Pop <elendil@planet.nl> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Thu, 1 Oct 2009 22:26:00 +0000 (15:26 -0700)]
net: splice() from tcp to pipe should take into account O_NONBLOCK
tcp_splice_read() doesnt take into account socket's O_NONBLOCK flag
Before this patch :
splice(socket,0,pipe,0,128*1024,SPLICE_F_MOVE);
causes a random endless block (if pipe is full) and
splice(socket,0,pipe,0,128*1024,SPLICE_F_MOVE | SPLICE_F_NONBLOCK);
will return 0 immediately if the TCP buffer is empty.
User application has no way to instruct splice() that socket should be in blocking mode
but pipe in nonblock more.
Many projects cannot use splice(tcp -> pipe) because of this flaw.
It doesn't make the splice itself necessarily nonblocking (because the
actual file descriptors that are spliced from/to may block unless they
have the O_NONBLOCK flag set), but it makes the splice pipe operations
nonblocking.
Linus intention was clear : let SPLICE_F_NONBLOCK control the splice pipe mode only
This patch instruct tcp_splice_read() to use the underlying file O_NONBLOCK
flag, as other socket operations do.
Bjorn Helgaas [Fri, 2 Oct 2009 15:03:12 +0000 (11:03 -0400)]
ACPI: fix bus scanning memory leaks
Free an acpi_get_object_info() buffer when we're finished. Skip the
acpi_get_name() altogether -- it was only used for a printk that was
really just for debug anyway.
http://bugzilla.kernel.org/show_bug.cgi?id=14271
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Reported-and-tested-by: Zdenek Kabelac <zdenek.kabelac@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
ACPI: EC: Restart command even if no interrupts from EC
EC may forget a command without sending any "reset" interrupt,
thus we need to lessen the requirement for transaction restart.
Reference: http://bugzilla.kernel.org/show_bug.cgi?id=14247 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
Takashi Iwai [Fri, 2 Oct 2009 12:06:08 +0000 (14:06 +0200)]
ALSA: usb - Use strlcat() correctly
Don't pass the advanced position to strlcat() but just gives the buffer
head position so that the max size limit can be checked correctly.
Introduced a new helper function to standaralize strlcat() calls.
Peter Ujfalusi [Wed, 30 Sep 2009 06:27:24 +0000 (09:27 +0300)]
ASoC: Fix SND_SOC_DAPM_LINE handling
Since the SND_SOC_DAPM_LINE can be input or output, additional check is
needed in order to determine if the widget is connected as input or
output.
When checking for connected outputs, if the widget is line, than check
if the sources list is not empty (line is connected as output)
For input endpoint check, when the widget is line, also check if the
sinks list is not empty (line is connected as input).
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Takashi Iwai [Fri, 2 Oct 2009 07:03:58 +0000 (09:03 +0200)]
ALSA: hda - Fix / improve ALC66x parser
The auto-parser for ALC662/663/272 codecs doesn't work properly when
a speaker is connected to mono NID 0x17, and doesn't handle the dynamic
DAC assignment properly.
This patch fixes the issues and also improves the assignment of DACs
so that HP and speakers can have independent volume controls.
Sven Eckelmann [Thu, 1 Oct 2009 18:06:39 +0000 (20:06 +0200)]
ALSA: ctxfi: Swapped SURROUND-SIDE mute
On Soundblaster X-FI Titenium with emu20k2 the SIDE and SURROUND mute
functions are swapped.
It was checked with 'speaker-test -c 8 -s 3' and (un)mute surround or
'speaker-test -c 8 -s 7' and (un)mute side. The volume seems not
to be affected and works as expected.
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Daniel T Chen [Thu, 1 Oct 2009 22:56:30 +0000 (18:56 -0400)]
ALSA: intel8x0 - Mute External Amplifier by default for Sony VAIO VGN-B1VP
BugLink: https://bugs.launchpad.net/bugs/410933
This Sony VAIO model also needs External Amplifier unmuted for audible
playback, so make sure we set the inv_eapd quirk.
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Linus Torvalds [Fri, 2 Oct 2009 03:23:15 +0000 (20:23 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
Btrfs: fix data space leak fix
Btrfs: remove duplicates of filemap_ helpers
Btrfs: take i_mutex before generic_write_checks
Btrfs: fix arguments to btrfs_wait_on_page_writeback_range
Btrfs: fix deadlock with free space handling and user transactions
Btrfs: fix error cases for ioctl transactions
Btrfs: Use CONFIG_BTRFS_POSIX_ACL to enable ACL code
Btrfs: introduce missing kfree
Btrfs: Fix setting umask when POSIX ACLs are not enabled
Btrfs: proper -ENOSPC handling
Otherwise the config function uses random data from the stack. This
didn't stick out because config is called once more in the chipselect
function with correct parameters.
Andy Spencer [Thu, 1 Oct 2009 22:44:27 +0000 (15:44 -0700)]
sscanf(): fix %*s%n
When using %*s, sscanf should honor conversion specifiers immediately
following the %*s. For example, the following code should find the
position of the end of the string "hello".
Ideally, sscanf would advance the fmt and str pointers the same as it
would without the *, but the code for that is rather complicated and is
not included in the patch.
Signed-off-by: Andy Spencer <andy753421@gmail.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Chuck Ebbert [Thu, 1 Oct 2009 22:44:26 +0000 (15:44 -0700)]
serial: add parameter to force skipping the test for the TXEN bug
Allow users to force skipping the TXEN test at init time. Applies
to all serial ports. Intended for debugging only.
There is a blacklist for devices where we need to skip the test but the
list is not complete. This lets users force skipping the test so we can
determine if they need to be added to the list.
Some HP machines with weird serial consoles have this problem and there
may be more.
Signed-off-by: Chuck Ebbert <cebbert@redhat.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Roel Kluin [Thu, 1 Oct 2009 22:44:24 +0000 (15:44 -0700)]
cyclades: fix read buffer overflow
irq is declared with size NR_CARDS (4), but the loop containing this
segment runs up until NR_ISA_ADDRS (16), possibly reading from irq[i] (and
trying to use the result)