Commit Graph

131793 Commits

Author SHA1 Message Date
Dave Kleikamp
d4cf109f05 vfs: Don't call attach_nobh_buffers() with an empty list
This is a modification of a patch by Bill Pemberton <wfp5p@virginia.edu>

nobh_write_end() could call attach_nobh_buffers() with head == NULL.
This would result in a trap when attach_nobh_buffers() attempted to
access bh->b_this_page.

This can be illustrated by running the writev01 testcase from LTP on jfs.

This error was introduced by commit 5b41e74a "vfs: fix data leak in
nobh_write_end()".  That patch did not take into account that if
PageMappedToDisk() is true upon entry to nobh_write_begin(), then no
buffers will be allocated for the page.  In that case, we won't have to
worry about a failed write leaving unitialized data in the page.

Of course, head != NULL implies !page_has_buffers(page), so no need to
test both.

Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Dmitri Monakhov <dmonakhov@openvz.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-06 13:34:22 -08:00
Jeremy Fitzhardinge
133822c5c0 x86: asm/io.h: unify ioremap prototypes
Impact: unify identical code

asm/io_32.h and _64.h have identical prototypes for the ioremap family
of functions.  The 32-bit header had a more descriptive comment.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 13:29:52 -08:00
Jeremy Fitzhardinge
976e8f677e x86: asm/io.h: unify virt_to_phys/phys_to_virt
Impact: unify identical code

asm/io_32.h and _64.h has functionally identical definitions for
virt_to_phys, phys_to_virt, page_to_phys, and the isa_* variants, so
just unify them.

The only slightly functional change is using phys_addr_t for the
physical address argument and return val.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 13:29:44 -08:00
Jeremy Fitzhardinge
26c8e31799 x86: make pgd/pud/pmd/pte_none consistent
The _none test is done differently for every level of the pagetable.
Standardize them by:

 1: Use the native_X_val to extract the raw entry, with no need to go
    via paravirt_ops, diff -r 1d0646d0d319 arch/x86/include/asm/pgtable.h, and
 2: Compare with 0 rather than using a boolean !, since they are actually values
    and not booleans.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:51 -08:00
Jeremy Fitzhardinge
18a7a199f9 x86: add and use pgd/pud/pmd_flags
Add pgd/pud/pmd_flags which are analogous to pte_flags, and use them
where-ever we only care about testing the flags portions of the
respective entries.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:51 -08:00
Jeremy Fitzhardinge
6cf7150084 x86: unify io_remap_pfn_range
Impact: cleanup

Unify io_remap_pfn_range.  Don't demacro yet.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:51 -08:00
Jeremy Fitzhardinge
7325cc2e33 x86: unify pgd_none
Impact: cleanup

Unify and demacro pgd_none.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:51 -08:00
Jeremy Fitzhardinge
deb79cfb36 x86: unify pud_none
Impact: cleanup

Unify and demacro pud_none.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:51 -08:00
Jeremy Fitzhardinge
cc290ca38c x86: unify pages_to_mb
Impact: cleanup

Unify and demacro pages_to_mb.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:51 -08:00
Jeremy Fitzhardinge
99510238bb x86: unify pmd_bad
Impact: cleanup

Unify and demacro pmd_bad.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:50 -08:00
Jeremy Fitzhardinge
a61bb29af4 x86: unify pgd_bad
Impact: cleanup

Unify and demacro pgd_bad.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:50 -08:00
Jeremy Fitzhardinge
30f103167f x86: unify pgd_bad
Impact: cleanup

Unify and demacro pgd_bad.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:50 -08:00
Jeremy Fitzhardinge
3f6cbef1d7 x86: unify pud_large
Impact: cleanup

Unify and demacro pud_large.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:50 -08:00
Jeremy Fitzhardinge
3fbc2444f4 x86: unify pte_offset_kernel
Impact: cleanup

Unify and demacro pte_offset_kernel.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:50 -08:00
Jeremy Fitzhardinge
346309cff6 x86: unify pte_index
Impact: cleanup

Unify and demacro pte_index.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:50 -08:00
Jeremy Fitzhardinge
97e2817d34 x86: unify pmd_pfn
Impact: cleanup

Unify pmd_pfn.  Unfortunately it can't be demacroed because it has a
cyclic dependency on linux/mm.h:page_to_nid().

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:50 -08:00
Jeremy Fitzhardinge
3180fba0ee x86: unify pmd_pfn
Impact: cleanup

Unify and demacro pmd_pfn.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:49 -08:00
Jeremy Fitzhardinge
bd44d64db1 x86: remove redundant pfn_pmd definition
Impact: cleanup

It's already defined in pgtable.h

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:49 -08:00
Jeremy Fitzhardinge
01ade20d5a x86: unify pmd_offset
Impact: cleanup

Unify and demacro pmd_offset.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:49 -08:00
Jeremy Fitzhardinge
e24d7eee0b x86: unify pmd_index
Impact: cleanup

Unify and demacro pmd_index.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:49 -08:00
Jeremy Fitzhardinge
20063ca4eb x86: unify pmd_page
Impact: cleanup

Unify and demacro pmd_page.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:49 -08:00
Jeremy Fitzhardinge
3ffb3564cd x86: unify pmd_page_vaddr
Impact: cleanup

Unify and demacro pmd_page_vaddr.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:49 -08:00
Jeremy Fitzhardinge
3d081b1812 x86: unify pud_offset
Impact: cleanup

Unify and demacro pud_offset.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:49 -08:00
Jeremy Fitzhardinge
7cfb81024b x86: unify pud_index
Impact: cleanup

Unify and demacro pud_index.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:48 -08:00
Jeremy Fitzhardinge
777cba16aa x86: unify pgd_page
Impact: cleanup

Unify and demacro pgd_page.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:48 -08:00
Jeremy Fitzhardinge
f476961cb1 x86: unify pud_page
Impact: cleanup

Unify and demacro pud_page.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:48 -08:00
Jeremy Fitzhardinge
aca159dbb1 x86: include pgtable_SIZE.h earlier
We'll need the definitions sooner.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:48 -08:00
Jeremy Fitzhardinge
6fff47e3ac x86: unify pud_page_vaddr
Impact: cleanup

Unify and demacro pud_page_vaddr.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:48 -08:00
Jeremy Fitzhardinge
c5f040b12b x86: unify pgd_page_vaddr
Impact: cleanup

Unify and demacro pgd_page_vaddr.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:48 -08:00
Jeremy Fitzhardinge
4fea801ac9 x86: unify pmd_none
Impact: cleanup

Unify and demacro pmd_none.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:48 -08:00
Jeremy Fitzhardinge
649e8ef60f x86: unify pmd_present
Impact: cleanup

Unify and demacro pmd_present.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:47 -08:00
Jeremy Fitzhardinge
9f38d7e85e x86: unify pgd_present
Impact: cleanup

Unify and demacro pgd_present.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:07 -08:00
Jeremy Fitzhardinge
5ba7c91341 x86: unify pud_present
Impact: cleanup

Unify and demacro pud_present.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:31:07 -08:00
Jeremy Fitzhardinge
7c683851d9 x86: unify pte_present
Impact: cleanup

Unify and demacro pte_present.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:28:37 -08:00
Jeremy Fitzhardinge
8de01da35e x86: unify pte_same
Impact: cleanup

Unify and demacro pte_same.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:26:08 -08:00
Jeremy Fitzhardinge
a034a010f4 x86: unify pte_none
Impact: cleanup

Unify and demacro pte_none.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2009-02-06 12:26:08 -08:00
Linus Torvalds
6cec50838e Merge branch 'for-linus' of git://git.kernel.org/pub/scm/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 - Add missing COEF initialization for ALC887
  ALSA: hda - Add missing initialization for ALC272
  sound: usb-audio: handle wMaxPacketSize for FIXED_ENDPOINT devices
  ALSA: hda - Fix misc workqueue issues
  ALSA: hda - Add quirk for FSC Amilo Xi2550
2009-02-06 11:14:23 -08:00
Len Brown
9e3a9d1ed8 ACPI: disable ACPI cleanly when bad RSDP found
When ACPI is disabled in the BIOS of this VIA C3 box,
it invalidates the RSDP, which Linux notices:

ACPI Error (tbxfroot-0218): A valid RSDP was not found [20080926]

Bug Linux neglected to disable ACPI at that stage,
and later scribbled on smp_found_config:

ACPI: No APIC-table, disabling MPS

But this box doesn't run well in legacy PIC mode,
it needed IOAPIC mode to perform correctly:

http://lkml.org/lkml/2009/2/5/39

So exit ACPI mode cleanly when we first detect
that it is hopeless.

Signed-off-by: Len Brown <len.brown@intel.com>
2009-02-06 14:00:56 -05:00
Len Brown
9fdd54f206 ACPI: delete CPU_IDLE=n code
CPU_IDLE=y has been default for ACPI=y since Nov-2007,
and has shipped in many distributions since then.

Here we delete the CPU_IDLE=n ACPI idle code, since
nobody should be using it, and we don't want to
maintain two versions.

Signed-off-by: Len Brown <len.brown@intel.com>
2009-02-06 12:34:39 -05:00
Linus Torvalds
5e3bd4e4b1 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  ieee1394: dv1394: move deprecation message from module init to file open
  firewire: core: Remove card from list of cards when enable fails
2009-02-06 08:48:16 -08:00
Uwe Kleine-König
bcee402e76 Add Sascha Hauer to .mailmap
This fixes the shortlog attribution e.g. for 106757b38f

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-06 08:47:25 -08:00
Uwe Kleine-König
6d7f2caa77 add another mailmap entry for Uwe Kleine-König
I created commit 7971db5a4b on a machine
where I forgot to set user.name and user.email before.  The default
values were not optimal.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-06 08:47:25 -08:00
Julia Lawall
08c6e3a578 arch/powerpc: Eliminate double sizeof
Taking sizeof the result of sizeof is quite strange and does not seem to be
what is wanted here.

This was fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression E;
@@

- sizeof (
  sizeof (E)
- )

@@
type T;
@@

- sizeof (
  sizeof (T)
- )
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-02-06 10:44:28 -06:00
paulfax
7f3ea17f31 powerpc/cpm2: Fix set interrupt type
This is a simple change to correct problems when using set_irq_type
on platforms using CPM2.  This code corrects the problem on most platform
but may have issues on 8272 derived platforms for some interrupts.

On 8272 PC2 & 3 are missing and PC 23 & 29 are added, which this patch
does not address.

Signed-off-by: Paul Bilke <paul@conspiracy.net>
Reviewed-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-02-06 10:44:02 -06:00
Li Zefan
04ec93fe9b fork.c: fix NULL pointer dereference when nr_threads == threads-max
I happened to forked lots of processes, and hit NULL pointer dereference.
It is because in copy_process() after checking max_threads, 0 is returned
but not -EAGAIN.

The bug is introduced by "CRED: Detach the credentials from task_struct"
(commit f1752eec61).

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-06 08:43:11 -08:00
Anton Vorontsov
e85477f516 powerpc/83xx: Fix TSEC0 workability on MPC8313E-RDB boards
TSEC0 is connected to Vitesse 7385 5-port switch. The switch
isn't connected to any mdio bus, the link to the switch is fixed
to Full-duplex 1000 Mb/s (no pause).

This patch fixes following failure during bootup:

mdio@24520:01 not found
eth0: Could not attach to PHY
IP-Config: Failed to open eth0

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-02-06 10:38:57 -06:00
Anton Vorontsov
1f0d4d16d9 powerpc/83xx: Fix missing #{address,size}-cells in mpc8313erdb.dts
commit b31a1d8b41 ("gianfar: Convert
gianfar to an of_platform_driver") introduced a child node for
the ethernet@25000 controller, but no address and size cells
specifiers were added, and that makes dtc unhappy:

DTC: dts->dtb  on file "arch/powerpc/boot/dts/mpc8313erdb.dts"
Warning (reg_format): "reg" property in /soc8313@e0000000/ethernet@25000/mdio@25520 has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)
Warning (avoid_default_addr_size): Relying on default #address-cells value for /soc8313@e0000000/ethernet@25000/mdio@25520
Warning (avoid_default_addr_size): Relying on default #size-cells value for /soc8313@e0000000/ethernet@25000/mdio@25520

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-02-06 10:38:54 -06:00
Michael Neuling
e2a02ba667 powerpc/83xx: Build breakage for CONFIG_PM but no CONFIG_SUSPEND
I noticed this doing some randconfig testing (.config below).  I have
CONFIG_PM but no CONFIG_SUSPEND.  Bug is against mainline.

arch/powerpc/sysdev/built-in.o: In function `ipic_suspend':
ipic.c:(.text+0x6b34): undefined reference to `fsl_deep_sleep'
make[1]: *** [.tmp_vmlinux1] Error 1
make: *** [sub-make] Error 2

Looks like #ifdef CONFIG_PM in arch/powerpc/sysdev/ipic.c should be
CONFIG_SUSPEND.  d49747bdfb introduced
this.

Fix build when we have CONFIG_PM but no CONFIG_SUSPEND.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-02-06 10:36:44 -06:00
Chris Mason
42f15d77df Btrfs: Make sure dir is non-null before doing S_ISGID checks
The S_ISGID check in btrfs_new_inode caused an oops during subvol creation
because sometimes the dir is null.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
2009-02-06 11:35:57 -05:00
Linus Torvalds
b2a740aab8 Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md:
  md: Ensure an md array never has too many devices.
  md: Fix a bug in linear.c causing which_dev() to return the wrong device.
  md: Allow read error in a single drive raid1 to be passed up.
2009-02-06 07:41:10 -08:00