linux-2.6
15 years agoTouch all affected namespaces on propagation of mount
Al Viro [Tue, 7 Apr 2009 16:15:39 +0000 (12:15 -0400)] 
Touch all affected namespaces on propagation of mount

We shouldn't just touch the namespace of current process

Caught-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoFix AUTOFS_DEV_IOCTL_REQUESTER_CMD
Al Viro [Tue, 7 Apr 2009 13:03:30 +0000 (09:03 -0400)] 
Fix AUTOFS_DEV_IOCTL_REQUESTER_CMD

Missing conversion from kernel to userland dev_t; this sucker
breaks as soon as we get sufficiently many autofs mounts for
new_encode_dev(s_dev) != s_dev.

Note: this is the minimal fix.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agosh: Fix mmap2 for handling differing PAGE_SIZEs.
Toshinobu Sugioka [Mon, 20 Apr 2009 22:34:53 +0000 (07:34 +0900)] 
sh: Fix mmap2 for handling differing PAGE_SIZEs.

mmap2 uses a fixed page shift of 12, regardless of the PAGE_SIZE setting.
Fix up the mmap2 code to add some sanity checks on the mapping, and to
update pgoff accordingly.

Error handling bits based on 4280e3126f641898f0ed1a931645373d3489e2a6
("frv: fix mmap2 error handling").

Signed-off-by: Toshinobu Sugioka <sugioka@itonet.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Mon, 20 Apr 2009 22:33:46 +0000 (15:33 -0700)] 
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

15 years agotg3: Fix SEEPROM accesses
Matt Carlson [Mon, 20 Apr 2009 21:52:29 +0000 (14:52 -0700)] 
tg3: Fix SEEPROM accesses

The recent NVRAM patches sanitized how the driver deals with NVRAM
data, but they failed to bring the SEEPROM interfaces inline with
the new strategy.  This patch brings the SEEPROM interfaces up to date.
This patch also reverts commit 0d489ffb76de0fe804cf06a9d4d11fa7342d74b9
("tg3: fix big endian MAC address collection failure").

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Tested-by: Robin Holt <holt@sgi.com>
Tested-by: James Bottomley <james.bottomley@HansenPartnership.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomac80211: fix basic rate bitmap calculation
Johannes Berg [Sun, 19 Apr 2009 11:22:11 +0000 (13:22 +0200)] 
mac80211: fix basic rate bitmap calculation

"mac80211: fix basic rates setting from association response"
introduced a copy/paste error.

Unfortunately, this not just leads to wrong data being passed
to the driver but is remotely exploitable for some hardware or
driver combinations.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: stable@kernel.org [2.6.29]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: fix beacon loss detection after scan
Kalle Valo [Sun, 19 Apr 2009 05:47:19 +0000 (08:47 +0300)] 
mac80211: fix beacon loss detection after scan

Currently beacon loss detection triggers after a scan. A probe request
is sent and a message like this is printed to the log:

wlan0: beacon loss from AP 00:12:17:e7:98:de - sending probe request

But in fact there is no beacon loss, the beacons are just not received
because of the ongoing scan. Fix it by updating last_beacon after
the scan has finished.

Reported-by: Jaswinder Singh Rajput <jaswinder@kernel.org>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agonl80211: Make nl80211_send_mlme_event() atomic
Jouni Malinen [Sat, 18 Apr 2009 18:53:15 +0000 (21:53 +0300)] 
nl80211: Make nl80211_send_mlme_event() atomic

One of the code paths sending deauth/disassoc events ends up calling
this function with rcu_read_lock held, so we must use GFP_ATOMIC in
allocation routines.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoar9170usb: fix hang on resume
Christian Lamparter [Sat, 18 Apr 2009 15:12:18 +0000 (17:12 +0200)] 
ar9170usb: fix hang on resume

This patch fixes a hang on resume when the filesystem is not
available and request_firmware blocks.

However, the device does not accept the firmware on resume.
and it will exit with:

> firmware part 1 upload failed (-71).
> device is in a bad state. please reconnect it!

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoMAC80211: Remove unused MAC80211_VERBOSE_SPECT_MGMT_DEBUG.
Robert P. J. Day [Sat, 18 Apr 2009 13:33:55 +0000 (09:33 -0400)] 
MAC80211: Remove unused MAC80211_VERBOSE_SPECT_MGMT_DEBUG.

Remove this unused Kconfig variable, which Intel apparently once
promised to make use of but never did.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomwl8k: fix module re-insertion bug
Joerg Albert [Sat, 18 Apr 2009 00:10:45 +0000 (02:10 +0200)] 
mwl8k: fix module re-insertion bug

swap mwl8k_remove and mwl8k_shutdown functions to allow
"rmmod mwl8k; modprobe mwl8k"

Signed-off-by: Joerg Albert <jal2@gmx.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: deactivate broken powersave function
Christian Lamparter [Fri, 17 Apr 2009 13:14:22 +0000 (15:14 +0200)] 
p54: deactivate broken powersave function

This patch deactivates powersave in station mode.

It does not work correctly yet, so the code does more harm than good.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945-base.c: Add missing space to debug print
Joe Perches [Thu, 16 Apr 2009 23:23:26 +0000 (16:23 -0700)] 
iwl3945-base.c: Add missing space to debug print

"not" is not printed without a space after %pM

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Don't free register information on suspend
Ivo van Doorn [Sat, 28 Mar 2009 19:51:58 +0000 (20:51 +0100)] 
rt2x00: Don't free register information on suspend

After suspend & resume the rt2x00 devices won't wakeup
anymore due to a broken register information setup.
The most important problem is the release of the EEPROM
buffer which is completely cleared and never read again
after the suspend.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoBtrfs: use the right node in reada_for_balance
Chris Mason [Mon, 20 Apr 2009 19:50:10 +0000 (15:50 -0400)] 
Btrfs: use the right node in reada_for_balance

reada_for_balance was using the wrong index into the path node array,
so it wasn't reading the right blocks.  We never directly used the
results of the read done by this function because the btree search is
started over at the end.

This fixes reada_for_balance to reada in the correct node and to
avoid searching past the last slot in the node.  It also makes sure to
hold the parent lock while we are finding the nodes to read.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoBtrfs: fix oops on page->mapping->host during writepage
Chris Mason [Mon, 20 Apr 2009 19:50:09 +0000 (15:50 -0400)] 
Btrfs: fix oops on page->mapping->host during writepage

The extent_io writepage call updates the writepage index in the inode
as it makes progress.  But, it was doing the update after unlocking the page,
which isn't legal because page->mapping can't be trusted once the page
is unlocked.

This lead to an oops, especially common with compression turned on.  The
fix here is to update the writeback index before unlocking the page.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoBtrfs: add a priority queue to the async thread helpers
Chris Mason [Mon, 20 Apr 2009 19:50:09 +0000 (15:50 -0400)] 
Btrfs: add a priority queue to the async thread helpers

Btrfs is using WRITE_SYNC_PLUG to send down synchronous IOs with a
higher priority.  But, the checksumming helper threads prevent it
from being fully effective.

There are two problems.  First, a big queue of pending checksumming
will delay the synchronous IO behind other lower priority writes.  Second,
the checksumming uses an ordered async work queue.  The ordering makes sure
that IOs are sent to the block layer in the same order they are sent
to the checksumming threads.  Usually this gives us less seeky IO.

But, when we start mixing IO priorities, the lower priority IO can delay
the higher priority IO.

This patch solves both problems by adding a high priority list to the async
helper threads, and a new btrfs_set_work_high_prio(), which is used
to make put a new async work item onto the higher priority list.

The ordering is still done on high priority IO, but all of the high
priority bios are ordered separately from the low priority bios.  This
ordering is purely an IO optimization, it is not involved in data
or metadata integrity.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoBtrfs: use WRITE_SYNC for synchronous writes
Chris Mason [Mon, 20 Apr 2009 19:50:09 +0000 (15:50 -0400)] 
Btrfs: use WRITE_SYNC for synchronous writes

Part of reducing fsync/O_SYNC/O_DIRECT latencies is using WRITE_SYNC for
writes we plan on waiting on in the near future.  This patch
mirrors recent changes in other filesystems and the generic code to
use WRITE_SYNC when WB_SYNC_ALL is passed and to use WRITE_SYNC for
other latency critical writes.

Btrfs uses async worker threads for checksumming before the write is done,
and then again to actually submit the bios.  The bio submission code just
runs a per-device list of bios that need to be sent down the pipe.

This list is split into low priority and high priority lists so the
WRITE_SYNC IO happens first.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Mon, 20 Apr 2009 19:34:36 +0000 (12:34 -0700)] 
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] fix allmodconfig compilation breakage.
  [IA64] smp_flush_tlb_mm() should only send IPI's to cpus in cpu_vm_mask
  [IA64] export smp_send_reschedule

15 years agopowerpc: Fix of_node_put() exit path in of_irq_map_one()
Ilpo Järvinen [Mon, 20 Apr 2009 18:18:43 +0000 (12:18 -0600)] 
powerpc: Fix of_node_put() exit path in of_irq_map_one()

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years agopowerpc/5200: defconfig updates
Grant Likely [Mon, 20 Apr 2009 17:33:12 +0000 (11:33 -0600)] 
powerpc/5200: defconfig updates

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years ago[IA64] fix allmodconfig compilation breakage.
Isaku Yamahata [Sat, 18 Apr 2009 03:15:23 +0000 (12:15 +0900)] 
[IA64] fix allmodconfig compilation breakage.

This patch fixes the following compilation error caused by recursive
inclusion of kernel.h which defines BUILD_BUG_ON().
In this case, the case it catches will be caught by the case
CONFIG_PARAVIRT=n, so removing it would not hurt compile time check
very much. So fix the breakage by removing it.

  CC      arch/ia64/kernel/asm-offsets.s
In file included from include/linux/bitops.h:17,
                 from include/linux/kernel.h:15,
                 from include/linux/sched.h:52,
                 from arch/ia64/kernel/asm-offsets.c:9:
arch/ia64/include/asm/bitops.h: In function 'set_bit':
arch/ia64/include/asm/bitops.h:47: error: implicit declaration of function 'BUILD_BUG_ON'

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Tony Luck <tony.luck@intel.com>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Mon, 20 Apr 2009 15:43:06 +0000 (08:43 -0700)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/rafael/suspend-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
  PM/Suspend: Introduce two new platform callbacks to avoid breakage

15 years agoMerge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Mon, 20 Apr 2009 15:42:48 +0000 (08:42 -0700)] 
Merge branch 'drm-linus' of git://git./linux/kernel/git/airlied/drm-2.6

* 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  agp: zero pages before sending to userspace
  drm: check for minor master before allowing drop master.
  drm: set/clear is_master when master changed
  drm: clean dirty memory after device release
  drm: count reaches -1

15 years agoMerge branch 'for-linus' of git://neil.brown.name/md
Linus Torvalds [Mon, 20 Apr 2009 15:37:37 +0000 (08:37 -0700)] 
Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
  md: support bitmaps on RAID10 arrays larger then 2 terabytes
  md: update sync_completed and reshape_position even more often.
  md: improve usefulness and accuracy of sysfs file md/sync_completed.
  md: allow setting newly added device to 'in_sync' via sysfs.
  md: tiny md.h cleanups

15 years agoFS-Cache: Add MAINTAINERS record for FS-Cache and CacheFiles
David Howells [Mon, 20 Apr 2009 14:46:45 +0000 (15:46 +0100)] 
FS-Cache: Add MAINTAINERS record for FS-Cache and CacheFiles

Add MAINTAINERS record for FS-Cache and CacheFiles.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFRV: Don't attempt to #include <linux/blk.h> as it doesn't exist
David Howells [Mon, 20 Apr 2009 11:46:24 +0000 (12:46 +0100)] 
FRV: Don't attempt to #include <linux/blk.h> as it doesn't exist

Stop the FRV arch from attempting to #include <linux/blk.h> as it doesn't
exist.

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodriver: dont update dev_name via device_add path
Kay Sievers [Sat, 18 Apr 2009 22:05:45 +0000 (15:05 -0700)] 
driver: dont update dev_name via device_add path

notice one system /proc/iomem some entries missed the name for pci_devices

it turns that dev->dev.kobj name is changed after device_add.

for pci code: via acpi_pci_root_driver.ops.add (aka acpi_pci_root_add)
==> pci_acpi_scan_root is used to scan pci bus/device, and at the same
time we read the resource for pci_dev in the pci_read_bases, we have
res->name = pci_name(pci_dev); pci_name is calling dev_name.

later via acpi_pci_root_driver.ops.start (aka acpi_pci_root_start) ==>
pci_bus_add_device to add all pci_dev in kobj tree.  pci_bus_add_device
will call device_add.

actually in device_add

        /* first, register with generic layer. */
        error = kobject_add(&dev->kobj, dev->kobj.parent, "%s", dev_name(dev));
        if (error)
                goto Error;

will get one new name for that kobj, old name is freed.

[Impact: fix corrupted names in /proc/iomem ]

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoGFS2: Fix page_mkwrite() return code
Steven Whitehouse [Mon, 20 Apr 2009 08:45:54 +0000 (09:45 +0100)] 
GFS2: Fix page_mkwrite() return code

This allows for the possibility of returning VM_FAULT_OOM as
well as VM_FAULT_SIGBUS. This ensures that the correct action
is taken.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
15 years agoMerge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6
Russell King [Mon, 20 Apr 2009 13:03:04 +0000 (14:03 +0100)] 
Merge branch 'fix' of git://git./linux/kernel/git/ycmiao/pxa-linux-2.6

15 years ago[ARM] 5457/1: mach-imx gpio buildfix
David Brownell [Mon, 20 Apr 2009 02:33:09 +0000 (03:33 +0100)] 
[ARM] 5457/1: mach-imx gpio buildfix

From: David Brownell <dbrownell@users.sourceforge.net>

Fix GPIO-related build error on mach-imx platform:

  CC      drivers/spi/spi_gpio.o
In file included from /home/db/kernel/scratch/arch/arm/include/asm/gpio.h:5,
                 from include/linux/gpio.h:7,
                 from drivers/spi/spi_gpio.c:23:
arch/arm/mach-imx/include/mach/gpio.h: In function 'imx_gpio_get_value':
arch/arm/mach-imx/include/mach/gpio.h:27: error: implicit declaration of function '__REG2'
arch/arm/mach-imx/include/mach/gpio.h:27: error: 'IMX_IO_BASE' undeclared (first use in this function)
arch/arm/mach-imx/include/mach/gpio.h:27: error: (Each undeclared identifier is reported only once
arch/arm/mach-imx/include/mach/gpio.h:27: error: for each function it appears in.)
arch/arm/mach-imx/include/mach/gpio.h: In function 'imx_gpio_set_value_inline':
arch/arm/mach-imx/include/mach/gpio.h:36: error: 'IMX_IO_BASE' undeclared (first use in this function)
arch/arm/mach-imx/include/mach/gpio.h:36: error: lvalue required as left operand of assignment
arch/arm/mach-imx/include/mach/gpio.h:38: error: lvalue required as left operand of assignment
...

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] 5456/1: add sys_preadv and sys_pwritev
Mikael Pettersson [Sat, 18 Apr 2009 20:26:57 +0000 (21:26 +0100)] 
[ARM] 5456/1: add sys_preadv and sys_pwritev

Kernel 2.6.30-rc1 added sys_preadv and sys_pwritev to most archs
but not ARM, resulting in

<stdin>:1421:2: warning: #warning syscall preadv not implemented
<stdin>:1425:2: warning: #warning syscall pwritev not implemented

This patch adds sys_preadv and sys_pwritev to ARM.

These syscalls simply take five long-sized parameters, so they
should have no calling-convention/ABI issues in the kernel.

Tested on armv5tel eabi using a preadv/pwritev test program posted
on linuxppc-dev earlier this month.

It would be nice to get this into the kernel before 2.6.30 final,
so that glibc's kernel version feature test for these syscalls
doesn't have to special-case ARM.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoALSA: Atiixp: Add SSID for mute_led quirk (unknown HP model)
Daniel T Chen [Mon, 20 Apr 2009 11:09:11 +0000 (07:09 -0400)] 
ALSA: Atiixp: Add SSID for mute_led quirk (unknown HP model)

Reference: Ubuntu #84973 (https://launchpad.net/bugs/84973)
Reference: Linux #8001 (http://bugzilla.kernel.org/show_bug.cgi?id=8001)

Make the mute LED function properly on this unknown HP model.

Signed-off-by: Daniel T Chen <seven.steps@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: us122l: add snd_us122l_free()
Karsten Wiese [Mon, 20 Apr 2009 11:01:21 +0000 (13:01 +0200)] 
ALSA: us122l: add snd_us122l_free()

Use it to clean up snd_us122l_card_used[].

Without patch unplugging of an US122L soundcard didn't reset the
corresponding element of snd_us122l_card_used[] to 0.
The (SNDRV_CARDS + 1)th plugging in did not result in creating the soundcard
device anymore.
Index values supplied with the modprobe command line were not used correctly
anymore after the first unplugging of an US122L.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agotun: Fix sk_sleep races when attaching/detaching
Herbert Xu [Sun, 19 Apr 2009 22:35:50 +0000 (22:35 +0000)] 
tun: Fix sk_sleep races when attaching/detaching

As the sk_sleep wait queue actually lives in tfile, which may be
detached from the tun device, bad things will happen when we use
sk_sleep after detaching.

Since the tun device is the persistent data structure here (when
requested by the user), it makes much more sense to have the wait
queue live there.  There is no reason to have it in tfile at all
since the only time we can wait is if we have a tun attached.
In fact we already have a wait queue in tun_struct, so we might
as well use it.

Reported-by: Eric W. Biederman <ebiederm@xmission.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Tested-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotun: Only free a netdev when all tun descriptors are closed
Herbert Xu [Sat, 18 Apr 2009 14:15:52 +0000 (14:15 +0000)] 
tun: Only free a netdev when all tun descriptors are closed

The commit c70f182940f988448f3c12a209d18b1edc276e33 ("tun: Fix
races between tun_net_close and free_netdev") fixed a race where
an asynchronous deletion of a tun device can hose a poll(2) on
a tun fd attached to that device.

However, this came at the cost of moving the tun wait queue into
the tun file data structure.  The problem with this is that it
imposes restrictions on when and where the tun device can access
the wait queue since the tun file may change at any time due to
detaching and reattaching.

In particular, now that we need to use the wait queue on the
receive path it becomes difficult to properly synchronise this
with the detachment of the tun device.

This patch solves the original race in a different way.  Since
the race is only because the underlying memory gets freed, we
can prevent it simply by ensuring that we don't do that until
all tun descriptors ever attached to the device (even if they
have since be detached because they may still be sitting in poll)
have been closed.

This is done by using reference counting the attached tun file
descriptors.  The refcount in tun->sk has been reappropriated
for this purpose since it was already being used for that, albeit
from the opposite angle.

Note that we no longer zero tfile->tun since tun_get will return
NULL anyway after the refcount on tfile hits zero.  Instead it
represents whether this device has ever been attached to a device.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Fix GRO for multiple page fragments
Ben Hutchings [Thu, 16 Apr 2009 08:04:20 +0000 (08:04 +0000)] 
net: Fix GRO for multiple page fragments

This loop over fragments in napi_fraginfo_skb() was "interesting".

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluet...
David S. Miller [Mon, 20 Apr 2009 09:16:44 +0000 (02:16 -0700)] 
Merge branch 'master' of git://git./linux/kernel/git/holtmann/bluetooth-2.6

15 years agonet: fix "compatibility" typos
Marcin Slusarz [Sun, 19 Apr 2009 07:24:24 +0000 (07:24 +0000)] 
net: fix "compatibility" typos

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: fix mid-wq adjustment helper
Ilpo Järvinen [Sat, 18 Apr 2009 05:48:48 +0000 (05:48 +0000)] 
tcp: fix mid-wq adjustment helper

Just noticed while doing some new work that the recent
mid-wq adjustment logic will misbehave when FACK is not
in use (happens either due sysctl'ed off or auto-detected
reordering) because I forgot the relevant TCPCB tagbit.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: sch_netem: Fix an inconsistency in ingress netem timestamps.
Jarek Poplawski [Fri, 17 Apr 2009 10:08:49 +0000 (10:08 +0000)] 
net: sch_netem: Fix an inconsistency in ingress netem timestamps.

Alex Sidorenko reported:

"while experimenting with 'netem' we have found some strange behaviour. It
seemed that ingress delay as measured by 'ping' command shows up on some
hosts but not on others.

After some investigation I have found that the problem is that skbuff->tstamp
field value depends on whether there are any packet sniffers enabled. That
is:

- if any ptype_all handler is registered, the tstamp field is as expected
- if there are no ptype_all handlers, the tstamp field does not show the delay"

This patch prevents unnecessary update of tstamp in dev_queue_xmit_nit()
on ingress path (with act_mirred) adding a check, so minimal overhead on
the fast path, but only when sniffers etc. are active.

Since netem at ingress seems to logically emulate a network before a host,
tstamp is zeroed to trigger the update and pretend delays are from the
outside.

Reported-by: Alex Sidorenko <alexandre.sidorenko@hp.com>
Tested-by: Alex Sidorenko <alexandre.sidorenko@hp.com>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoax25: proc uid file misses header
Alan Cox [Fri, 17 Apr 2009 04:19:36 +0000 (04:19 +0000)] 
ax25: proc uid file misses header

This has been broken for a while. I happened to catch it testing because one
app "knew" that the top line of the calls data was the policy line and got
confused.

Put the header back.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocxgb3: Fix EEH final recovery attempt
Divy Le Ray [Fri, 17 Apr 2009 12:21:27 +0000 (12:21 +0000)] 
cxgb3: Fix EEH final recovery attempt

EEH attempts to recover up 6 times.
The last attempt leaves all the ports and adapter down.hen
The driver is then unloaded, bringing the adapter down again
unconditionally. The unload will hang.
Check if the adapter is already down before trying to bring it down again.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocxgb3: Fix potential msi-x vector leak
Divy Le Ray [Fri, 17 Apr 2009 12:21:22 +0000 (12:21 +0000)] 
cxgb3: Fix potential msi-x vector leak

Release vectors when a MSI-X allocation fails.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocxgb3: fix workqueue flush issues
Divy Le Ray [Fri, 17 Apr 2009 12:21:17 +0000 (12:21 +0000)] 
cxgb3: fix workqueue flush issues

The fatal error task can be scheduled while processing an offload packet
in NAPI context when the connection handle is bogus. this can race
with the ports being brought down and the cxgb3 workqueue being flushed.
Stop napi processing before flushing the work queue.

The ULP drivers (iSCSI, iWARP) might also schedule a task on keventd_wk
while releasing a connection handle (cxgb3_offload.c::cxgb3_queue_tid_release()).
The driver however does not flush any work on keventd_wq while being unloaded.
This patch also fixes this.

Also call cancel_delayed_work_sync in place of the the deprecated
cancel_rearming_delayed_workqueue.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocxgb3: fix link fault handling
Divy Le Ray [Fri, 17 Apr 2009 12:21:11 +0000 (12:21 +0000)] 
cxgb3: fix link fault handling

Use the existing periodic task to handle link faults.
The link fault interrupt handler is also called in work queue context,
which is wrong and might cause potential deadlocks.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoGFS2: Clear dirty bit at end of inode glock sync
Steven Whitehouse [Mon, 20 Apr 2009 07:58:45 +0000 (08:58 +0100)] 
GFS2: Clear dirty bit at end of inode glock sync

The dirty bit can get set during the inode glock sync. Its too
complicated to change that at the moment, so this is the quick
fix - to clear the bit again at the end of the function.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
15 years agomd: support bitmaps on RAID10 arrays larger then 2 terabytes
NeilBrown [Mon, 20 Apr 2009 01:50:24 +0000 (11:50 +1000)] 
md: support bitmaps on RAID10 arrays larger then 2 terabytes

.. and other arrays with components larger than 2 terabytes.

We use a "long" rather than a "sector_t" in part of the bitmap
size calculations, which is sad.

Reported-by: "Mario 'BitKoenig' Holbe" <Mario.Holbe@TU-Ilmenau.DE>
Signed-off-by: NeilBrown <neilb@suse.de>
15 years agoagp: zero pages before sending to userspace
Shaohua Li [Mon, 20 Apr 2009 00:08:35 +0000 (10:08 +1000)] 
agp: zero pages before sending to userspace

AGP pages might be mapped into userspace finally, so the pages should be
set to zero before userspace can use it. Otherwise there is potential
information leakage.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: check for minor master before allowing drop master.
Dave Airlie [Sun, 19 Apr 2009 23:32:50 +0000 (09:32 +1000)] 
drm: check for minor master before allowing drop 

When fast user switching a lot eventually we get to the point,
where we were checking for the wrong thing in this function.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: set/clear is_master when master changed
Jonas Bonn [Thu, 16 Apr 2009 07:00:02 +0000 (09:00 +0200)] 
drm: set/clear is_master when master changed

The variable is_master is being used to track the drm_file that is currently
master, so its value needs to be updated accordingly when the master is
changed.

Signed-off-by: Jonas Bonn <jonas@southpole.se>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: clean dirty memory after device release
Ma Ling [Thu, 16 Apr 2009 09:51:25 +0000 (17:51 +0800)] 
drm: clean dirty memory after device release

In current code we register/unregister connector object by
drm_sysfs_connector_add/remove function.

However under some cases, we need to dynamically register or unregister device
multiple times, so we have to go through register -> unregister ->register
routine.

Because after device_unregister function our memory is dirty, we need to do
clean operation in order to re-register the device, otherwise the system
will crash.  The patch intends to clean device after device release.

Signed-off-by: Ma Ling <ling.ma@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: count reaches -1
Roel Kluin [Thu, 16 Apr 2009 20:57:46 +0000 (22:57 +0200)] 
drm: count reaches -1

With a postfix decrement in the test count will reach -1 rather than 0,
subsequent tests fail.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoPM/Suspend: Introduce two new platform callbacks to avoid breakage
Rafael J. Wysocki [Sun, 19 Apr 2009 18:08:42 +0000 (20:08 +0200)] 
PM/Suspend: Introduce two new platform callbacks to avoid breakage

Commit 900af0d973856d6feb6fc088c2d0d3fde57707d3 (PM: Change suspend
code ordering) changed the ordering of suspend code in such a way
that the platform .prepare() callback is now executed after the
device drivers' late suspend callbacks have run.  Unfortunately, this
turns out to break ARM platforms that need to talk via I2C to power
control devices during the .prepare() callback.

For this reason introduce two new platform suspend callbacks,
.prepare_late() and .wake(), that will be called just prior to
disabling non-boot CPUs and right after bringing them back on line,
respectively, and use them instead of .prepare() and .finish() for
ACPI suspend.  Make the PM core execute the .prepare() and .finish()
platform suspend callbacks where they were executed previously (that
is, right after calling the regular suspend methods provided by
device drivers and right before executing their regular resume
methods, respectively).

It is not necessary to make analogous changes to the hibernation
code and data structures at the moment, because they are only used
by ACPI platforms.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Len Brown <len.brown@intel.com>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-lguest-and-virtio
Linus Torvalds [Sun, 19 Apr 2009 17:58:20 +0000 (10:58 -0700)] 
Merge git://git./linux/kernel/git/rusty/linux-2.6-lguest-and-virtio

* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-lguest-and-virtio:
  lguest: document 32-bit and PAE requirements
  lguest: tell git to ignore Documentation/lguest/lguest
  virtio: fix suspend when using virtio_balloon
  lguest: fix guest crash on non-linear addresses in gdt pvops
  lguest: fix crash on vmlinux images

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Sun, 19 Apr 2009 17:57:38 +0000 (10:57 -0700)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Set function_id only on FG nodes
  ALSA: MAINTAINERS - Update SOUND
  ALSA: emu10k1 - off by 1 in snd_emu10k1_wait()
  ASoC: OMAP: Fix FS polarity in OSK5912 machine driver
  ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver
  ASoC: Fix include build error in s3c2412-i2s.c
  ASoC: Fix s3c-i2s-v2.c snd_soc_dai changes
  ASoC: s3c-i2s-v2.c fix for s3c_i2sv2_iis_calc_rate
  ASoC: Fix jive_wm8750.c build problems
  ASoC: pxa-ssp: allow setting of dai format 0
  ALSA: hda - Add upper-limit of mixer amp for AD1884A-laptop model, too
  ALSA: hda - Fix headphone-detection on some machines with STAC/IDT codecs
  ALSA: Intel8x0: Add hp_only quirk for SSID 0x1028016a (Dell Inspiron 8600)
  ALSA: Intel8x0: Remove conflicting quirk for SSID 0x103c0934
  ALSA: hda_intel.c - Consolidate bitfields

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
Linus Torvalds [Sun, 19 Apr 2009 17:54:06 +0000 (10:54 -0700)] 
Merge git://git./linux/kernel/git/sam/kbuild-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
  kbuild: introduce subdir-ccflags-y
  kbuild: support include/generated

15 years agoRevert "console ASCII glyph 1:1 mapping"
Samuel Thibault [Sat, 18 Apr 2009 20:17:17 +0000 (22:17 +0200)] 
Revert "console ASCII glyph 1:1 mapping"

This reverts commit 1c55f18717304100a5f624c923f7cb6511b4116d.

Ingo Brueckl was assuming that reverting to 1:1 mapping for chars >= 128
was not useful, but it happens to be: due to the limitations of the
Linux console, when a blind user wants to read BIG5 on it, he has no
other way than loading a font without SFM and let the 1:1 mapping permit
the screen reader to get the BIG5 encoding.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years ago<linux/seccomp.h> needs to include <linux/errno.h>.
Ralf Baechle [Sat, 18 Apr 2009 09:30:56 +0000 (11:30 +0200)] 
<linux/seccomp.h> needs to include <linux/errno.h>.

<linux/seccomp.h> uses EINVAL so should include <linux/errno.h>.  This
fixes a build error on 64-bit MIPS if CONFIG_SECCOMP is disabled.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoDon't set relatime when noatime is specified
Andi Kleen [Sun, 19 Apr 2009 16:40:43 +0000 (18:40 +0200)] 
Don't set relatime when noatime is specified

Since commit 0a1c01c9477602ee8b44548a9405b2c1d587b5a2 ("Make relatime
default") when a file system is mounted explicitely with noatime it gets
both the MNT_RELATIME and MNT_NOATIME bits set.

This shows up like this in /proc/mounts:

  /dev/xxx /yyy ext3 rw,noatime,relatime,errors=continue,data=writeback 0 0

That looks strange.  The VFS uses noatime in this case, but both flags
are set.  So it's more a cosmetic issue, but still better to fix.

Cc: mjg@redhat.com
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoBluetooth: Add workaround for wrong HCI event in eSCO setup
Marcel Holtmann [Sun, 19 Apr 2009 17:30:03 +0000 (19:30 +0200)] 
Bluetooth: Add workaround for wrong HCI event in eSCO setup

The Broadcom chips with 2.1 firmware handle the fallback case to a SCO
link wrongly when setting up eSCO connections.

  < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17
      handle 11 voice setting 0x0060
  > HCI Event: Command Status (0x0f) plen 4
      Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
  > HCI Event: Connect Complete (0x03) plen 11
      status 0x00 handle 1 bdaddr 00:1E:3A:xx:xx:xx type SCO encrypt 0x01

The Link Manager negotiates the fallback to SCO, but then sends out
a Connect Complete event. This is wrong and the Link Manager should
actually send a Synchronous Connection Complete event if the Setup
Synchronous Connection has been used. Only the remote side is allowed
to use Connect Complete to indicate the missing support for eSCO in
the host stack.

This patch adds a workaround for this which clearly should not be
needed, but reality is that broken Broadcom devices are deployed.

Based on a report by Ville Tervo <ville.tervo@nokia.com>

Signed-off-by: Marcel Holtman <marcel@holtmann.org>
15 years agoBluetooth: Fallback from eSCO to SCO on unspecified error
Marcel Holtmann [Sun, 19 Apr 2009 17:14:14 +0000 (19:14 +0200)] 
Bluetooth: Fallback from eSCO to SCO on unspecified error

Some Bluetooth chips (like the ones from Texas Instruments) don't do
proper eSCO negotiations inside the Link Manager. They just return an
error code and in case of the Kyocera ED-8800 headset it is just a
random error.

  < HCI Command: Setup Synchronous Connection 0x01|0x0028) plen 17
    handle 1 voice setting 0x0060
  > HCI Event: Command Status (0x0f) plen 4
    Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
  > HCI Event: Synchronous Connect Complete (0x2c) plen 17
    status 0x1f handle 257 bdaddr 00:14:0A:xx:xx:xx type eSCO
    Error: Unspecified Error

In these cases it is up to the host stack to fallback to a SCO setup
and so retry with SCO parameters.

Based on a report by Nick Pelly <npelly@google.com>

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
15 years agoBluetooth: Fix removing of RFCOMM DLC timer with DEFER_SETUP
Johan Hedberg [Thu, 26 Mar 2009 14:41:56 +0000 (16:41 +0200)] 
Bluetooth: Fix removing of RFCOMM DLC timer with DEFER_SETUP

There is a missing call to rfcomm_dlc_clear_timer in the case that
DEFER_SETUP is used and so the connection gets disconnected after the
timeout even if it was successfully accepted previously.

This patch adds a call to rfcomm_dlc_clear_timer to rfcomm_dlc_accept
which will get called when the user accepts the connection by calling
read() on the socket.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
15 years ago[ARM] pxa/pcm990: start external GPIOs immediately after built-in ones
Guennadi Liakhovetski [Wed, 15 Apr 2009 11:56:08 +0000 (13:56 +0200)] 
[ARM] pxa/pcm990: start external GPIOs immediately after built-in ones

As a result of an off-by-1 error pcm990 leaves one unused GPIO number between
built-in GPIOs and the pca9536 extender. Fix it.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years ago[ARM] pxa/palm27x: General fix for Palm27x aSoC driver
Marek Vasut [Fri, 17 Apr 2009 09:37:35 +0000 (11:37 +0200)] 
[ARM] pxa/palm27x: General fix for Palm27x aSoC driver

Firstly, this patch makes the palm27x asoc driver a little more sane. Also,
since all affected devices use GPIO95 as AC97_nRESET, this patch sets that
properly. Affected are PalmT5, TX and LifeDrive.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years agolguest: document 32-bit and PAE requirements
Rusty Russell [Mon, 20 Apr 2009 05:14:02 +0000 (23:14 -0600)] 
lguest: document 32-bit and PAE requirements

Robert noted that we don't actually document that lguest is 32-bit only,
nor that PAE must be off (CONFIG_PAE is now prompted for if HIGHMEM is
set to "off).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: lguest@ozlabs.org
Cc: "Robert P. J. Day" <rpjday@crashcourse.ca>
15 years agolguest: tell git to ignore Documentation/lguest/lguest
Matt Kraai [Fri, 17 Apr 2009 06:46:20 +0000 (23:46 -0700)] 
lguest: tell git to ignore Documentation/lguest/lguest

This is the example lguest launcher binary.

Signed-off-by: Matt Kraai <kraai@ftbfs.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
15 years agovirtio: fix suspend when using virtio_balloon
Marcelo Tosatti [Fri, 17 Apr 2009 00:14:04 +0000 (21:14 -0300)] 
virtio: fix suspend when using virtio_balloon

Break out of wait_event_interruptible() if freezing has been requested,
in the vballoon thread. Without this change vballoon refuses to stop and
the system can't suspend.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: stable@kernel.org
15 years agolguest: fix guest crash on non-linear addresses in gdt pvops
Rusty Russell [Mon, 20 Apr 2009 05:14:00 +0000 (23:14 -0600)] 
lguest: fix guest crash on non-linear addresses in gdt pvops

Fixes guest crash 'lguest: bad read address 0x4800000 len 256'

The new per-cpu allocator ends up handing a non-linear address to
write_gdt_entry.  We do __pa() on it, and hand it to the host, which
kills us.

I've long wanted to make the hypercall "LOAD_GDT_ENTRY" to match the IDT
code, but had no pressing reason until now.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: lguest@ozlabs.org
15 years agolguest: fix crash on vmlinux images
Matias Zabaljauregui [Wed, 8 Apr 2009 20:58:39 +0000 (17:58 -0300)] 
lguest: fix crash on vmlinux images

Typical message: 'lguest: unhandled trap 6 at 0x418726 (0x0)'

vmlinux guests were broken by 4cd8b5e2a159f18a1507f1187b44a1acbfa6341b
'lguest: use KVM hypercalls', which rewrites guest text from kvm hypercalls
to trap 31.

The Launcher mmaps the kernel image.  The Guest executes and
immediately faults in the first text page (read-only).  Then it hits a
hypercall, and we rewrite that hypercall, causing a copy-on-write.
But the Guest pagetables still refer to the old page: we fault again,
but as Host we see the hypercall already rewritten, and pass the fault
back to the Guest.  The Guest hasn't set up an IDT yet, so we kill it.

This doesn't happen with bzImages: they unpack themselves and so the
text pages are already read-write.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Tested-by: Patrick McHardy <kaber@trash.net>
15 years agoMerge branch 'fix/misc' into for-linus
Takashi Iwai [Sun, 19 Apr 2009 09:40:02 +0000 (11:40 +0200)] 
Merge branch 'fix/misc' into for-linus

* fix/misc:
  ALSA: MAINTAINERS - Update SOUND
  ALSA: emu10k1 - off by 1 in snd_emu10k1_wait()

15 years agoMerge branch 'fix/intel8x0' into for-linus
Takashi Iwai [Sun, 19 Apr 2009 09:39:57 +0000 (11:39 +0200)] 
Merge branch 'fix/intel8x0' into for-linus

* fix/intel8x0:
  ALSA: Intel8x0: Add hp_only quirk for SSID 0x1028016a (Dell Inspiron 8600)
  ALSA: Intel8x0: Remove conflicting quirk for SSID 0x103c0934

15 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Sun, 19 Apr 2009 09:39:46 +0000 (11:39 +0200)] 
Merge branch 'fix/hda' into for-linus

* fix/hda:
  ALSA: hda - Set function_id only on FG nodes
  ALSA: hda - Add upper-limit of mixer amp for AD1884A-laptop model, too
  ALSA: hda - Fix headphone-detection on some machines with STAC/IDT codecs
  ALSA: hda_intel.c - Consolidate bitfields

15 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Sun, 19 Apr 2009 09:39:38 +0000 (11:39 +0200)] 
Merge branch 'fix/asoc' into for-linus

* fix/asoc:
  ASoC: OMAP: Fix FS polarity in OSK5912 machine driver
  ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver
  ASoC: Fix include build error in s3c2412-i2s.c
  ASoC: Fix s3c-i2s-v2.c snd_soc_dai changes
  ASoC: s3c-i2s-v2.c fix for s3c_i2sv2_iis_calc_rate
  ASoC: Fix jive_wm8750.c build problems
  ASoC: pxa-ssp: allow setting of dai format 0

15 years agokbuild: introduce subdir-ccflags-y
Sam Ravnborg [Sun, 19 Apr 2009 09:04:26 +0000 (11:04 +0200)] 
kbuild: introduce subdir-ccflags-y

Following patch introduce support for setting options
to gcc that has effect for current directory and all
subdirectories.

The typical use case are an architecture or a subsystem that
decide to cover all files with -Werror.
Today alpha, mips and sparc uses -Werror in almost all their
Makefile- with subdir-ccflag-y it is now simpler to do so
as only the top-level directories needs to be covered.

Likewise if we decide to cover a full subsystem such
as net/ with -Werror this is done by adding a single
line to net/Makefile.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
15 years agokbuild: support include/generated
Sam Ravnborg [Sat, 18 Apr 2009 21:51:08 +0000 (23:51 +0200)] 
kbuild: support include/generated

We need a location for generated files.
Today they are spread over several places and bringing them
together to a common place makes it obvious hat is generated
and what isreal files.

Al Viro originally suggested: include/gen
Linus suggested to spell it out.

This patch implement support for

    include/generated

All files in include/generated are ignored by git.
include/generated is removed during "make mrproper".

With this we are ready to implement support for include/generated
in the various architctures and in the base kernel.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoRemove 'recurse into child resources' logic from 'reserve_region_with_split()'
Linus Torvalds [Sun, 19 Apr 2009 04:44:24 +0000 (21:44 -0700)] 
Remove 'recurse into child resources' logic from 'reserve_region_with_split()'

This function is not actually used right now, since the original use
case for it was done with insert_resource_expand_to_fit() instead.

However, we now have another usage case that wants to basically do a
"reserve IO resource, splitting around existing resources", however that
one doesn't actually want the "recurse into the conflicting resource"
logic at all.

And since recursing into the conflicting resource was the most complex
part, and isn't wanted, just remove it.  Maybe we'll some day want both
versions, but we can just resurrect the logic then.

Tested-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Sun, 19 Apr 2009 04:37:07 +0000 (21:37 -0700)] 
Merge git://git./linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  cifs: when renaming don't try to unlink negative dentry
  cifs: remove unneeded bcc_ptr update in CIFSTCon
  cifs: add cFYI messages with some of the saved strings from ssetup/tcon
  cifs: fix buffer size for tcon->nativeFileSystem field
  cifs: fix unicode string area word alignment in session setup
  [CIFS] Fix build break caused by change to new current_umask helper function
  [CIFS] Fix sparse warnings
  [CIFS] Add support for posix open during lookup
  cifs: no need to use rcu_assign_pointer on immutable keys
  cifs: remove dnotify thread code
  [CIFS] remove some build warnings
  cifs: vary timeout on writes past EOF based on offset (try #5)
  [CIFS] Fix build break from recent DFS patch when DFS support not enabled
  Remote DFS root support.
  [CIFS] Endian convert UniqueId when reporting inode numbers from server files
  cifs: remove some pointless conditionals before kfree()
  cifs: flush data on any setattr

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Sat, 18 Apr 2009 19:07:25 +0000 (12:07 -0700)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/bart/ide-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  cs5536: define dma_sff_read_status() method
  ide: fix barriers support
  ide: Remove void casts
  hpt366: use ATA_DMA_* constants
  hpt366: fix HPT370 DMA timeouts

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Sat, 18 Apr 2009 18:37:50 +0000 (11:37 -0700)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  Smack: check for SMACK xattr validity in smack_inode_setxattr

15 years agodoc: fix kernel-parameters.txt mistaken deletions
Randy Dunlap [Sat, 18 Apr 2009 01:30:28 +0000 (18:30 -0700)] 
doc: fix kernel-parameters.txt mistaken deletions

Re-add missing kernel-parameters documentation that was accidentally
deleted in commit 0cb55ad2.

Thanks to Ingo and Weidong Han for the heads-up on this.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
cc: Ingo Molnar <mingo@elte.hu>
cc: Len Brown <lenb@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoPM/Hibernate: Fix memory shrinking
Rafael J. Wysocki [Sat, 18 Apr 2009 15:23:41 +0000 (17:23 +0200)] 
PM/Hibernate: Fix memory shrinking

Commit d979677c4c0 ("mm: shrink_all_memory(): use sc.nr_reclaimed")
broke the memory shrinking used by hibernation, becuse it did not update
shrink_all_zones() in accordance with the other changes it made.

Fix this by making shrink_all_zones() update sc->nr_reclaimed instead of
overwriting its value.

This fixes http://bugzilla.kernel.org/show_bug.cgi?id=13058

Reported-and-tested-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocs5536: define dma_sff_read_status() method
Sergei Shtylyov [Sat, 18 Apr 2009 15:42:20 +0000 (17:42 +0200)] 
cs5536: define dma_sff_read_status() method

The driver somehow got merged with the initializer for the dma_sff_read_status()
method missing which caused kernel panic on bootup.

This should fix the kernel.org bug #13026...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Reported-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: fix barriers support
Bartlomiej Zolnierkiewicz [Sat, 18 Apr 2009 15:42:20 +0000 (17:42 +0200)] 
ide: fix barriers support

Freeing non-slab objects is bad and results in an oops.  Fix it.

Reported-and-tested-by: Andrew Price <andy@andrewprice.me.uk>
Cc: Theodore Tso <tytso@mit.edu>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: Remove void casts
Jack Stone [Sat, 18 Apr 2009 15:42:19 +0000 (17:42 +0200)] 
ide: Remove void casts

Remove uneeded void casts

Signed-off-by: Jack Stone <jwjstone@fastmail.fm>
Cc: jeff@garzik.org
Cc: kernel-janitors@vger.kernel.org
Cc: Jack Stone <jwjstone@fastmail.fm>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agohpt366: use ATA_DMA_* constants
Sergei Shtylyov [Sat, 18 Apr 2009 15:42:19 +0000 (17:42 +0200)] 
hpt366: use ATA_DMA_* constants

Use ATA_DMA_* constants instead of the bare numbers for the BMIDE register bits.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agohpt366: fix HPT370 DMA timeouts
Sergei Shtylyov [Sat, 18 Apr 2009 15:42:19 +0000 (17:42 +0200)] 
hpt366: fix HPT370 DMA timeouts

The big driver change in 2.4.19-rc1 introduced a regression for many HPT370[A]
chips -- DMA stopped to work completely, only causing endless timeouts...

The culprit has been identified (at last!): it turned to be the code resetting
the DMA state machine before each transfer. Stop doing it now as this counter-
measure has clearly caused more harm than good.

This should fix the kernel.org bug #7703.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoASoC: Fix warning in wm9705
Russell King - ARM Linux [Sat, 18 Apr 2009 09:11:53 +0000 (10:11 +0100)] 
ASoC: Fix warning in wm9705

I notice that the fixes were merged, minus one:

sound/soc/codecs/wm9705.c: At top level:
sound/soc/codecs/wm9705.c:445: warning: initialization from incompatible pointer type

so you might find this trivial patch useful.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoSmack: check for SMACK xattr validity in smack_inode_setxattr
Etienne Basset [Thu, 16 Apr 2009 21:58:42 +0000 (23:58 +0200)] 
Smack: check for SMACK xattr validity in smack_inode_setxattr

the following patch moves checks for SMACK xattr validity
from smack_inode_post_setxattr (which cannot return an error to the user)
to smack_inode_setxattr (which can return an error).

Signed-off-by: Etienne Basset <etienne.basset@numericable.fr>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: James Morris <jmorris@namei.org>
15 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Fri, 17 Apr 2009 23:20:29 +0000 (16:20 -0700)] 
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [libata] fix build error on drivers/ata/pata_legacy.c
  pata_via: Cache and rewrite the device bit
  sata_mv: workaround for multi_count errata sata24
  sata_mv: tidy up qc->tf usage in qc_prep() functions

15 years ago[libata] fix build error on drivers/ata/pata_legacy.c
Zhenwen Xu [Fri, 17 Apr 2009 07:32:59 +0000 (15:32 +0800)] 
[libata] fix build error on drivers/ata/pata_legacy.c

fix those errors:

drivers/ata/pata_legacy.c: In function ‘pdc_data_xfer_vlb’:
drivers/ata/pata_legacy.c:289: error: ‘ap’ undeclared (first use in this function)
drivers/ata/pata_legacy.c:289: error: (Each undeclared identifier is reported only once
drivers/ata/pata_legacy.c:289: error: for each function it appears in.)
drivers/ata/pata_legacy.c: At top level:
drivers/ata/pata_legacy.c:869: error: ‘ATA_PFLAG_PIO32_CHANGE’ undeclared here (not in a
+function)
make[2]: *** [drivers/ata/pata_legacy.o] Error 1
make[1]: *** [drivers/ata] Error 2

Signed-off-by: Zhenwen Xu <helight.xu@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agopata_via: Cache and rewrite the device bit
Alan Cox [Fri, 17 Apr 2009 11:21:21 +0000 (12:21 +0100)] 
pata_via: Cache and rewrite the device bit

Some VIA chipsets will reset the DEV bit after IEN changes on ctl. Our
optimised write path avoids doing this but we need to remove the
optimisation on these devices.

[Identified and some original patches proposed by Josehn Chan @ VIA but
discussion then all ground to a halt so given a test case I dug it back out]

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk
Tested-by: Christoph Bisping (bug #13086)
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agosata_mv: workaround for multi_count errata sata24
Mark Lord [Mon, 13 Apr 2009 15:29:34 +0000 (11:29 -0400)] 
sata_mv: workaround for multi_count errata sata24

Workaround for errata SATA#24 in sata_mv.
This errata affects WRITE_MULTI* commands when
the device multi_count produces a DRQ block size >= 4Kbytes.

We work around it here by converting such operations
into ordinary PIO_WRITEs instead.

Note that this might result in a PIO FUA write unavoidably being converted
into a non-FUA write.  In practice, any system using FUA is also going to be
using DMA rather than PIO, so this shouldn't affect anyone in the real world.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agosata_mv: tidy up qc->tf usage in qc_prep() functions
Mark Lord [Mon, 13 Apr 2009 15:27:18 +0000 (11:27 -0400)] 
sata_mv: tidy up qc->tf usage in qc_prep() functions

Tidy up qc->tf accesses in the mv_qc_prep() functions.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agovlan/macvlan: fix NULL pointer dereferences in ethtool handlers
Patrick McHardy [Fri, 17 Apr 2009 22:59:23 +0000 (15:59 -0700)] 
vlan/macvlan: fix NULL pointer dereferences in ethtool handlers

Check whether the underlying device provides a set of ethtool ops before
checking for individual handlers to avoid NULL pointer dereferences.

Reported-by: Art van Breemen <ard@telegraafnet.nl>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Fri, 17 Apr 2009 22:54:40 +0000 (15:54 -0700)] 
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
David S. Miller [Fri, 17 Apr 2009 22:38:38 +0000 (15:38 -0700)] 
Merge branch 'master' of git://git./linux/kernel/git/kaber/nf-2.6

15 years agocifs: when renaming don't try to unlink negative dentry
Jeff Layton [Fri, 17 Apr 2009 15:45:30 +0000 (11:45 -0400)] 
cifs: when renaming don't try to unlink negative dentry

When attempting to rename a file on a read-only share, the kernel can
call cifs_unlink on a negative dentry, which causes an oops. Only try
to unlink the file if it's a positive dentry.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Tested-by: Shirish Pargaonkar <shirishp@us.ibm.com>
CC: Stable <stable@vger.kernel.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
Linus Torvalds [Fri, 17 Apr 2009 20:53:34 +0000 (13:53 -0700)] 
Merge git://git./linux/kernel/git/gregkh/staging-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (43 commits)
  staging: slicoss: update README
  otus/zdusb.c: additional USB idnetifier
  Staging: go7007: fix build issues
  Staging: sxg: Fix leaks and checksum errors in transmit code path
  Staging: sxg: Fix sleep in atomic context warning while loading driver
  Staging: sxg: Use correct queue_id for transmitting non-TCP packets
  Staging: sxg: Fire watchdog timer at end of open routine to change the link
  Staging: Pohmelfs: Add load balancing between network states with the same priority.
  Staging: Pohmelfs: Added IO permissions and priorities.
  Staging: Pohmelfs: Added ->show_stats() callback.
  Staging: Pohmelfs: Drop ftrans debugging code.
  Staging: Pohmelfs: Use wait_on_page_timeout when waiting for remote directory sync instead of hardcoded 25 seconds.
  Staging: Pohmelfs: Reduce debugging noise about non-existing objects.
  Staging: Pohmelfs: Sync fs before killing it, since dentry cache is shrunk before writeback is invoked via generic_shutdown_super()
  Staging: Pohmelfs: Extend remount option.
  Staging: Pohmelfs: Set NETFS_INODE_REMOTE_SYNCED and clear NETFS_INODE_OWNED bits in the root inode.
  Staging: Pohmelfs: Added 'need_lock' variable into debug print.
  Staging: Pohmelfs: Disable read lock in pohmelfs_getattr().
  Staging: Pohmelfs: Move parent lock to the place where we really have to send a lookup request to the server.
  Staging: pohmelfs: Populate dentry cache when receiving the new readdir entry.
  ...

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
Linus Torvalds [Fri, 17 Apr 2009 20:53:16 +0000 (13:53 -0700)] 
Merge git://git./linux/kernel/git/gregkh/driver-core-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  UIO: fix specific device driver missing statement for depmod
  Driver core: remove pr_fmt() from dynamic_dev_dbg() printk
  driver core: prevent device_for_each_child from oopsing
  dynamic debug: resurrect old pr_debug() semantics as pr_devel()
  Driver Core: early platform driver
  proc: mounts_poll() make consistent to mdstat_poll
  sysfs: sysfs poll keep the poll rule of regular file.
  driver core: allow non-root users to listen to uevents
  driver core: fix driver_match_device
  sysfs: don't use global workqueue in sysfs_schedule_callback()