Greg Ungerer [Mon, 16 Mar 2009 08:00:25 +0000 (18:00 +1000)]
m68k: merge the non-MMU and MMU versions of sigcontext.h
It is trivial to merge the non-MMU and MMU versions of sigcontext.h.
Without a single file "make headers_install" is broken for m68k
(since each of the sub-varients of sigconext.h are not installed).
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Greg Ungerer [Mon, 16 Mar 2009 07:54:49 +0000 (17:54 +1000)]
m68k: merge the non-MMU and MMU versions of swab.h
It is trivial to merge the non-MMU and MMU versions of swab.h.
Without a single file "make headers_install" is broken for m68k
(since each of the sub-varients of swab.h are not installed).
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Greg Ungerer [Mon, 16 Mar 2009 07:52:16 +0000 (17:52 +1000)]
m68k: merge the non-MMU and MMU versions of param.h
It is trivial to merge the non-MMU and MMU versions of param.h.
Without a single file "make headers_install" is broken for m68k
(since each of the sub-varients of param.h are not installed).
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Kyle McMartin [Sat, 14 Mar 2009 23:40:59 +0000 (19:40 -0400)]
parisc: sba_iommu: fix build bug when CONFIG_PARISC_AGP=y
CC drivers/parisc/sba_iommu.o
drivers/parisc/sba_iommu.c:1373: error: expected identifier or '('
before '}' token
make[2]: *** [drivers/parisc/sba_iommu.o] Error 1
make[1]: *** [drivers/parisc] Error 2
make: *** [drivers] Error 2
Don't know how this has gone missed for so long... clearly I need
to do builds on my C8000 more often.
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 15 Mar 2009 20:34:56 +0000 (13:34 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: (23 commits)
[ARM] Fix virtual to physical translation macro corner cases
[ARM] update mach-types
[ARM] 5421/1: ftrace: fix crash due to tracing of __naked functions
MX1 fix include
[ARM] 5419/1: ep93xx: fix build warnings about struct i2c_board_info
[ARM] 5418/1: restore lr before leaving mcount
ARM: OMAP: board-omap3beagle: set i2c-3 to 100kHz
ARM: OMAP: Allow I2C bus driver to be compiled as a module
ARM: OMAP: sched_clock() corrected
ARM: OMAP: Fix compile error if pm.h is included
[ARM] orion5x: pass dram mbus data to xor driver
[ARM] S3C64XX: Fix s3c64xx_setrate_clksrc
[ARM] S3C64XX: sparse warnings in arch/arm/plat-s3c64xx/irq.c
[ARM] S3C64XX: sparse warnings in arch/arm/plat-s3c64xx/s3c6400-clock.c
[ARM] S3C64XX: Fix USB host clock mux list
[ARM] S3C64XX: Fix name of USB host clock.
[ARM] S3C64XX: Rename IRQ_UHOST to IRQ_USBH
[ARM] S3C64XX: Do gpiolib configuration earlier
[ARM] S3C64XX: Staticise s3c64xx_init_irq_eint()
[ARM] SMDK6410: Declare iodesc table static
...
Linus Torvalds [Sat, 14 Mar 2009 20:43:18 +0000 (13:43 -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:
Fix Xilinx SystemACE driver to handle empty CF slot
block: fix memory leak in bio_clone()
block: Add gfp_mask parameter to bio_integrity_clone()
Grant Likely [Mon, 9 Mar 2009 12:42:24 +0000 (13:42 +0100)]
Fix Xilinx SystemACE driver to handle empty CF slot
The SystemACE driver does not handle an empty CF slot gracefully. An
empty CF slot ends up hanging the system. This patch adds a check for
the CF state and stops trying to process requests if the slot is empty.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Li Zefan [Mon, 9 Mar 2009 09:42:45 +0000 (10:42 +0100)]
block: fix memory leak in bio_clone()
If bio_integrity_clone() fails, bio_clone() returns NULL without freeing
the newly allocated bio.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
un'ichi Nomura [Mon, 9 Mar 2009 09:40:52 +0000 (10:40 +0100)]
block: Add gfp_mask parameter to bio_integrity_clone()
Stricter gfp_mask might be required for clone allocation.
For example, request-based dm may clone bio in interrupt context
so it has to use GFP_ATOMIC.
Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Cc: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Linus Torvalds [Sat, 14 Mar 2009 19:02:21 +0000 (12:02 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
MIPS: Mark Eins: Fix configuration.
MIPS: Fix TIF_32BIT undefined problem when seccomp is disabled
Linus Torvalds [Sat, 14 Mar 2009 19:01:37 +0000 (12:01 -0700)]
Merge git://git./linux/kernel/git/jejb/scsi-rc-fixes-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (31 commits)
[SCSI] qla2xxx: Update version number to 8.03.00-k4.
[SCSI] qla2xxx: Correct overwrite of pre-assigned init-control-block structure size.
[SCSI] qla2xxx: Correct truncation in return-code status checking.
[SCSI] qla2xxx: Correct vport delete bug.
[SCSI] qla2xxx: Use correct value for max vport in LOOP topology.
[SCSI] qla2xxx: Correct address range checking for option-rom updates.
[SCSI] fcoe: Change fcoe receive thread nice value from 19 (lowest priority) to -20
[SCSI] fcoe: fix handling of pending queue, prevent out of order frames (v3)
[SCSI] fcoe: Out of order tx frames was causing several check condition SCSI status
[SCSI] fcoe: fix kfree(skb)
[SCSI] fcoe: ETH_P_8021Q is already in if_ether and fcoe is not using it anyway
[SCSI] libfc: do not change the fh_rx_id of a recevied frame
[SCSI] fcoe: Correct fcoe_transports initialization vs. registration
[SCSI] fcoe: Use setup_timer() and mod_timer()
[SCSI] libfc, fcoe: Remove unnecessary cast by removing inline wrapper
[SCSI] libfc, fcoe: Cleanup function formatting and minor typos
[SCSI] libfc, fcoe: Fix kerneldoc comments
[SCSI] libfc: Cleanup libfc_function_template comments
[SCSI] libfc: check for err when recv and state is incorrect
[SCSI] libfc: rename rp to rdata in fc_disc_new_target()
...
Linus Torvalds [Sat, 14 Mar 2009 19:00:42 +0000 (12:00 -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:
ata_piix: add workaround for Samsung DB-P70
libata: Keep shadow last_ctl up to date during resets
sata_mv: fix MSI irq race condition
Linus Torvalds [Sat, 14 Mar 2009 19:00:18 +0000 (12:00 -0700)]
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
NFS: Fix the fix to Bugzilla #11061, when IPv6 isn't defined...
SUNRPC: xprt_connect() don't abort the task if the transport isn't bound
SUNRPC: Fix an Oops due to socket not set up yet...
Bug 11061, NFS mounts dropped
NFS: Handle -ESTALE error in access()
NLM: Fix GRANT callback address comparison when IPv6 is enabled
NLM: Shrink the IPv4-only version of nlm_cmp_addr()
NFSv3: Fix posix ACL code
NFS: Fix misparsing of nfsv4 fs_locations attribute (take 2)
SUNRPC: Tighten up the task locking rules in __rpc_execute()
Linus Torvalds [Sat, 14 Mar 2009 18:59:22 +0000 (11:59 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/mfasheh/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
ocfs2: Use xs->bucket to set xattr value outside
ocfs2: Fix a bug found by sparse check.
ocfs2: tweak to get the maximum inline data size with xattr
ocfs2: reserve xattr block for new directory with inline data
Linus Torvalds [Sat, 14 Mar 2009 18:59:05 +0000 (11:59 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
V4L/DVB (10978): Report tuning algorith correctly
V4L/DVB (10977): STB6100 init fix, the call to stb6100_set_bandwidth needs an argument
V4L/DVB (10976): Bug fix: For legacy applications stv0899 performs search only first time after insmod.
V4L/DVB (10975): Bug: Use signed types, Offsets and range can be negative
V4L/DVB (10974): Use Diseqc 3/3 mode to send data
V4L/DVB (10972): zl10353: i2c_gate_ctrl bug fix
V4L/DVB (10834): zoran: auto-select bt866 for AverMedia 6 Eyes
V4L/DVB (10832): tvaudio: Avoid breakage with tda9874a
V4L/DVB (10789): m5602-s5k4aa: Split up the initial sensor probe in chunks.
Linus Torvalds [Sat, 14 Mar 2009 18:58:38 +0000 (11:58 -0700)]
Merge git://git./linux/kernel/git/kyle/parisc-2.6.29
* git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6.29:
parisc: update defconfigs
parisc: define x->x mmio accessors
parisc: dino: struct device - replace bus_id with dev_name(), dev_set_name()
parisc: convert cpu_check_affinity to new cpumask api
parisc: convert (read|write)bwlq to inlines
parisc: fix use of new cpumask api in irq.c
parisc: update parisc for new irq_desc
parisc: update MAINTAINERS
parisc: fix wrong assumption about bus->self
parisc: fix 64bit build
parisc: add braces around arguments in assembler macros
parisc: fix dev_printk() compile warnings for accessing a device struct
parisc: remove unused local out_putf label
parisc: fix `struct pt_regs' declared inside parameter list warning
parisc: fix section mismatch warnings
parisc: remove klist iterators
parisc: BUG_ON() cleanup
Linus Torvalds [Sat, 14 Mar 2009 18:58:10 +0000 (11:58 -0700)]
Merge git://git./linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
ide: save the returned value of dma_map_sg
ide-floppy: do not map dataless cmds to an sg
Daisuke Nishimura [Fri, 13 Mar 2009 20:52:00 +0000 (13:52 -0700)]
vmscan: pgmoved should be cleared after updating recent_rotated
pgmoved should be cleared after updating recent_rotated.
Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Rik van Riel <riel@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tyler Hicks [Fri, 13 Mar 2009 20:51:59 +0000 (13:51 -0700)]
eCryptfs: don't encrypt file key with filename key
eCryptfs has file encryption keys (FEK), file encryption key encryption
keys (FEKEK), and filename encryption keys (FNEK). The per-file FEK is
encrypted with one or more FEKEKs and stored in the header of the
encrypted file. I noticed that the FEK is also being encrypted by the
FNEK. This is a problem if a user wants to use a different FNEK than
their FEKEK, as their file contents will still be accessible with the
FNEK.
This is a minimalistic patch which prevents the FNEKs signatures from
being copied to the inode signatures list. Ultimately, it keeps the FEK
from being encrypted with a FNEK.
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Cc: Serge Hallyn <serue@us.ibm.com>
Acked-by: Dustin Kirkland <kirkland@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Johannes Weiner [Fri, 13 Mar 2009 20:51:58 +0000 (13:51 -0700)]
nommu: ramfs: don't leak pages when adding to page cache fails
When a ramfs nommu mapping is expanded, contiguous pages are allocated
and added to the pagecache. The caller's reference is then passed on
by moving whole pagevecs to the file lru list.
If the page cache adding fails, make sure that the error path also
moves the pagevec contents which might still contain up to PAGEVEC_SIZE
successfully added pages, of which we would leak references otherwise.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Enrik Berkhan <Enrik.Berkhan@ge.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Enrik Berkhan [Fri, 13 Mar 2009 20:51:56 +0000 (13:51 -0700)]
nommu: ramfs: pages allocated to an inode's pagecache may get wrongly discarded
The pages attached to a ramfs inode's pagecache by truncation from nothing
- as done by SYSV SHM for example - may get discarded under memory
pressure.
The problem is that the pages are not marked dirty. Anything that creates
data in an MMU-based ramfs will cause the pages holding that data will
cause the set_page_dirty() aop to be called.
For the NOMMU-based mmap, set_page_dirty() may be called by write(), but
it won't be called by page-writing faults on writable mmaps, and it isn't
called by ramfs_nommu_expand_for_mapping() when a file is being truncated
from nothing to allocate a contiguous run.
The solution is to mark the pages dirty at the point of allocation by the
truncation code.
Signed-off-by: Enrik Berkhan <Enrik.Berkhan@ge.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ralf Baechle [Fri, 13 Mar 2009 20:17:57 +0000 (21:17 +0100)]
MIPS: Mark Eins: Fix configuration.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Zhang Le [Thu, 12 Mar 2009 10:00:50 +0000 (18:00 +0800)]
MIPS: Fix TIF_32BIT undefined problem when seccomp is disabled
Signed-off-by: Zhang Le <r0bertz@gentoo.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
FUJITA Tomonori [Fri, 13 Mar 2009 20:16:13 +0000 (21:16 +0100)]
ide: save the returned value of dma_map_sg
dma_map_sg could return a value different to 'nents' argument of
dma_map_sg so the ide stack needs to save it for the later usage
(e.g. for_each_sg).
The ide stack also needs to save the original sg_nents value for
pci_unmap_sg.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
[bart: backport to Linus' tree]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Borislav Petkov [Fri, 13 Mar 2009 20:16:12 +0000 (21:16 +0100)]
ide-floppy: do not map dataless cmds to an sg
since it fails the virt_to_page() translation check with DEBUG_VIRTUAL
enabled.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
[bart: backport to Linus' tree]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tejun Heo [Tue, 3 Mar 2009 04:52:16 +0000 (13:52 +0900)]
ata_piix: add workaround for Samsung DB-P70
Samsung DB-P70 somehow botched the first ICH9 SATA port. The board
doesn't expose the first port but somehow SStatus reports link online
while failing SRST protocol leading to repeated probe failures and
thus long boot delay.
Because the BIOS doesn't carry any identifying DMI information, the
port can't be blacklisted safely. Fortunately, the controller does
have subsystem vendor and ID set. It's unclear whether the subsystem
IDs are used only for the board but it can be safely worked around by
disabling SIDPR access and just using SRST works around the problem.
Even when the workaround is triggered on an unaffected board the only
side effect will be missing SCR access.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Joseph Jang <josephjang@gmail.com>
Reported-by: Jonghyon Sohn <mrsohn@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Stuart MENEFY [Tue, 10 Mar 2009 11:38:13 +0000 (11:38 +0000)]
libata: Keep shadow last_ctl up to date during resets
libata keeps a shadow copy of the ATA CTL register (which is write only),
and only writes to the hardware when the required value doesn't match
the shadow. However this copy wasn't being maintained when performing
reset functions. This could cause problems for the first operation after
a reset when the correct value might not be written to the CTL register.
This problem was observed when hotplugging a drive: the identify command
was being issued with interrupts enabled, when they should have been
disabled.
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Mark Lord [Tue, 10 Mar 2009 20:28:51 +0000 (16:28 -0400)]
sata_mv: fix MSI irq race condition
Fix a (rare) race condition in mv_interrupt() when using MSI.
The value of hpriv->main_irq_mask_addr can change on on the fly,
and without this patch we could end up writing back a stale copy
to the hardware.
Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Matthias Schwarzzot [Tue, 27 Jan 2009 19:29:44 +0000 (16:29 -0300)]
V4L/DVB (10978): Report tuning algorith correctly
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Werner [Tue, 27 Jan 2009 19:09:12 +0000 (16:09 -0300)]
V4L/DVB (10977): STB6100 init fix, the call to stb6100_set_bandwidth needs an argument
in Hz not kHz, and a comment incorrectly says MHz instead of Hz. I
don't know if this caused real problems anywhere
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Igor M. Liplianin [Sun, 9 Nov 2008 14:35:13 +0000 (11:35 -0300)]
V4L/DVB (10976): Bug fix: For legacy applications stv0899 performs search only first time after insmod.
For legacy applications stv0899 performs search only first time after insmod
due to not set DVBFE_ALGO_SEARCH_AGAIN bit
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Manu Abraham [Tue, 27 Jan 2009 14:03:16 +0000 (11:03 -0300)]
V4L/DVB (10975): Bug: Use signed types, Offsets and range can be negative
Code simplification: use in kernel macros
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sigmund Augdal [Mon, 26 Jan 2009 22:08:48 +0000 (19:08 -0300)]
V4L/DVB (10974): Use Diseqc 3/3 mode to send data
Signed-off-by: Sigmund Augdal <sigmund@snap.tv>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Kyle McMartin [Fri, 13 Mar 2009 05:33:34 +0000 (01:33 -0400)]
parisc: update defconfigs
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Kyle McMartin [Tue, 17 Feb 2009 17:42:52 +0000 (12:42 -0500)]
parisc: define x->x mmio accessors
Bloody inconsiderate driver writers...
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Kay Sievers [Mon, 26 Jan 2009 03:53:16 +0000 (03:53 +0000)]
parisc: dino: struct device - replace bus_id with dev_name(), dev_set_name()
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Kyle McMartin [Mon, 16 Feb 2009 08:20:54 +0000 (03:20 -0500)]
parisc: convert cpu_check_affinity to new cpumask api
cpumask arg to the affinity function is now const, sort
that out through the irq_desc implementations.
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Kyle McMartin [Mon, 16 Feb 2009 08:05:02 +0000 (03:05 -0500)]
parisc: convert (read|write)bwlq to inlines
Kills the 'value computed but not used' due to
leX_to_cpu.
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Kyle McMartin [Mon, 16 Feb 2009 07:53:03 +0000 (02:53 -0500)]
parisc: fix use of new cpumask api in irq.c
cpumask api needs to take a pointer to irq_desc[cpu].affinity
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Mike Travis [Tue, 13 Jan 2009 03:05:25 +0000 (03:05 +0000)]
parisc: update parisc for new irq_desc
Impact: cleanup, update to new cpumask API
Irq_desc.affinity and irq_desc.pending_mask are now cpumask_var_t's
so access to them should be using the new cpumask API.
Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Grant Grundler [Mon, 1 Dec 2008 07:21:35 +0000 (00:21 -0700)]
parisc: update MAINTAINERS
Signed-off-By: Grant Grundler <grundler@parisc-linux.org>
Reviewed-by: Matthew Wilcox <matthew@wil.cx>
Acked-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Grant Grundler [Thu, 29 Jan 2009 05:30:55 +0000 (22:30 -0700)]
parisc: fix wrong assumption about bus->self
Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> posted a patch series
to linux-pci to fix a wrong assumption about pci_bus->self==NULL for
all PCI host bus controllers. While PARISC platforms to not behave
this way, I prefer to have the code consistent across architectures.
The following patch replaces pci_bus->self with pci_bus->parent when
used as a test to check for "root bus controller".
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Helge Deller [Mon, 26 Jan 2009 21:24:38 +0000 (22:24 +0100)]
parisc: fix 64bit build
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Helge Deller [Sun, 18 Jan 2009 17:13:53 +0000 (18:13 +0100)]
parisc: add braces around arguments in assembler macros
Add braces around the macro arguments, else for example
"shl %r1, 5-3, %r2" would not expand to what you would assume.
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Helge Deller [Tue, 13 Jan 2009 20:14:51 +0000 (21:14 +0100)]
parisc: fix dev_printk() compile warnings for accessing a device struct
Fix compile warnings:
drivers/scsi/zalon.c: In function `zalon_probe':
drivers/scsi/zalon.c:140: warning: passing arg 1 of `dev_driver_string' from incompatible pointer type
drivers/scsi/zalon.c:140: warning: passing arg 1 of `dev_name' from incompatible pointer type
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Helge Deller [Tue, 13 Jan 2009 19:54:25 +0000 (20:54 +0100)]
parisc: remove unused local out_putf label
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Helge Deller [Tue, 13 Jan 2009 19:52:46 +0000 (20:52 +0100)]
parisc: fix `struct pt_regs' declared inside parameter list warning
Fix those compile warnings:
uaccess.h:244: warning: `struct pt_regs' declared inside parameter list
uaccess.h:244: warning: its scope is only this definition or declaration, which is probably not what you want
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Helge Deller [Tue, 13 Jan 2009 19:51:29 +0000 (20:51 +0100)]
parisc: fix section mismatch warnings
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
James Bottomley [Sat, 10 Jan 2009 00:57:06 +0000 (18:57 -0600)]
parisc: remove klist iterators
commit
11c3b5c3e08f4d855cbef52883c266b9ab9df879
Author: Greg Kroah-Hartman <gregkh@suse.de>
Date: Tue Dec 16 12:24:56 2008 -0800
driver core: move klist_children into private structure
Broke our parisc build pretty badly because we touch the klists directly
in three cases (AGP, SBA and GSC). Although GregKH will revert this
patch, there's no reason we should be using the iterators directly, we
can just move to the standard device_for_each_child() API.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Tested-by: Helge Deller <deller@gmx.de>
Tested-by: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Helge Deller [Tue, 6 Jan 2009 11:57:01 +0000 (12:57 +0100)]
parisc: BUG_ON() cleanup
- convert a few "if (xx) BUG();" to BUG_ON(xx)
- remove a few printk()s, as we get a backtrace with BUG_ON() anyway
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Antti Palosaari [Tue, 10 Mar 2009 16:06:40 +0000 (13:06 -0300)]
V4L/DVB (10972): zl10353: i2c_gate_ctrl bug fix
zl10353 i2c-gate was always closed and due to that devices having tuner
behind i2c-gate were broken. Add module configuration which allows disabling
i2c-gate only when really needed.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Linus Torvalds [Fri, 13 Mar 2009 02:39:28 +0000 (19:39 -0700)]
Linus 2.6.29-rc8
Linus Torvalds [Fri, 13 Mar 2009 02:32:51 +0000 (19:32 -0700)]
bitmap: fix end condition in bitmap_find_free_region
Guennadi Liakhovetski noticed that the end condition for the loop in
bitmap_find_free_region() is wrong, and the "return if error" was also
using the wrong conditional that would only trigger if the bitmap was an
exact multiple of the allocation size, which is not necessarily the case
with dma_alloc_from_coherent().
Such a failure would end up in bitmap_find_free_region() accessing
beyond the end of the bitmap.
Reported-by: Guennadi Liakhovetski <lg@denx.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tao Ma [Thu, 12 Mar 2009 00:37:34 +0000 (08:37 +0800)]
ocfs2: Use xs->bucket to set xattr value outside
A long time ago, xs->base is allocated a 4K size and all the contents
in the bucket are copied to the it. Now we use ocfs2_xattr_bucket to
abstract xattr bucket and xs->base is initialized to the start of the
bu_bhs[0]. So xs->base + offset will overflow when the value root is
stored outside the first block.
Then why we can survive the xattr test by now? It is because we always
read the bucket contiguously now and kernel mm allocate continguous
memory for us. We are lucky, but we should fix it. So just get the
right value root as other callers do.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Acked-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Tao Ma [Wed, 11 Mar 2009 22:24:23 +0000 (06:24 +0800)]
ocfs2: Fix a bug found by sparse check.
We need to use le32_to_cpu to test rec->e_cpos in
ocfs2_dinode_insert_check.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Acked-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Tiger Yang [Thu, 5 Mar 2009 03:06:15 +0000 (11:06 +0800)]
ocfs2: tweak to get the maximum inline data size with xattr
Replace max_inline_data with max_inline_data_with_xattr
to ensure it correct when xattr inlined.
Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
Acked-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Tiger Yang [Fri, 6 Mar 2009 02:19:30 +0000 (10:19 +0800)]
ocfs2: reserve xattr block for new directory with inline data
If this is a new directory with inline data, we choose to
reserve the entire inline area for directory contents and
force an external xattr block.
Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
Acked-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Linus Torvalds [Thu, 12 Mar 2009 23:35:26 +0000 (16:35 -0700)]
Merge git://git./linux/kernel/git/sam/kbuild-fixes
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
kbuild: remove unused -r option for module-init-tool depmod
kbuild: fix 'make rpm' when CONFIG_LOCALVERSION_AUTO=y and using SCM tree
kbuild: fix mkspec to cleanup RPM_BUILD_ROOT
kbuild: fix C libary confusion in unifdef.c due to getline()
Linus Torvalds [Thu, 12 Mar 2009 23:34:59 +0000 (16:34 -0700)]
Merge git://git./linux/kernel/git/rusty/linux-2.6-for-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
cpumask: mm_cpumask for accessing the struct mm_struct's cpu_vm_mask.
cpumask: tsk_cpumask for accessing the struct task_struct's cpus_allowed.
Linus Torvalds [Thu, 12 Mar 2009 23:32:36 +0000 (16:32 -0700)]
Merge git://git./linux/kernel/git/pkl/squashfs-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linus:
Squashfs: Valid filesystems are flagged as bad by the corrupted fs patch
Linus Torvalds [Thu, 12 Mar 2009 23:25:04 +0000 (16:25 -0700)]
Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
hwmon: (f75375s) Remove unnecessary and confusing initialization
hwmon: (it87) Properly decode -128 degrees C temperature
hwmon: (lm90) Document support for the MAX6648/6692 chips
hwmon: (abituguru3) Fix I/O error handling
Jody McIntyre [Thu, 12 Mar 2009 21:39:23 +0000 (17:39 -0400)]
trivial: fix bad links in the ext2 and ext3 documentation
Trivial patch to fix bad links in the ext2 and ext3 documentation.
Signed-off-by: Jody McIntyre <scjody@sun.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Thu, 12 Mar 2009 23:22:51 +0000 (16:22 -0700)]
Merge branch 'fixes-
20090312' of git://git./linux/kernel/git/willy/pci
* 'fixes-
20090312' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/pci:
PCIe: portdrv: call pci_disable_device during remove
pci: Fix typo in message while disabling HT MSI mapping
pci: don't disable too many HT MSI mapping
powerpc/pseries: The RPA PCI hotplug driver depends on EEH
PCIe: AER: during disable, check subordinate before walking
PCI: Add PCI quirk to disable L0s ASPM state for 82575 and 82598
Faisal Latif [Thu, 12 Mar 2009 21:34:59 +0000 (14:34 -0700)]
RDMA/nes: Don't allow userspace QPs to use STag zero
STag zero is a special STag that allows consumers to access any bus
address without registering memory. The nes driver unfortunately
allows STag zero to be used even with QPs created by unprivileged
userspace consumers, which means that any process with direct verbs
access to the nes device can read and write any memory accessible to
the underlying PCI device (usually any memory in the system). Such
access is usually given for cluster software such as MPI to use, so
this is a local privilege escalation bug on most systems running this
driver.
The driver was using STag zero to receive the last streaming mode
data; to allow STag zero to be disabled for unprivileged QPs, the
driver now registers a special MR for this data.
Cc: <stable@kernel.org>
Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Nick Piggin [Thu, 12 Mar 2009 21:31:38 +0000 (14:31 -0700)]
fs: new inode i_state corruption fix
There was a report of a data corruption
http://lkml.org/lkml/2008/11/14/121. There is a script included to
reproduce the problem.
During testing, I encountered a number of strange things with ext3, so I
tried ext2 to attempt to reduce complexity of the problem. I found that
fsstress would quickly hang in wait_on_inode, waiting for I_LOCK to be
cleared, even though instrumentation showed that unlock_new_inode had
already been called for that inode. This points to memory scribble, or
synchronisation problme.
i_state of I_NEW inodes is not protected by inode_lock because other
processes are not supposed to touch them until I_LOCK (and I_NEW) is
cleared. Adding WARN_ON(inode->i_state & I_NEW) to sites where we modify
i_state revealed that generic_sync_sb_inodes is picking up new inodes from
the inode lists and passing them to __writeback_single_inode without
waiting for I_NEW. Subsequently modifying i_state causes corruption. In
my case it would look like this:
CPU0 CPU1
unlock_new_inode() __sync_single_inode()
reg <- inode->i_state
reg -> reg & ~(I_LOCK|I_NEW) reg <- inode->i_state
reg -> inode->i_state reg -> reg | I_SYNC
reg -> inode->i_state
Non-atomic RMW on CPU1 overwrites CPU0 store and sets I_LOCK|I_NEW again.
Fix for this is rather than wait for I_NEW inodes, just skip over them:
inodes concurrently being created are not subject to data integrity
operations, and should not significantly contribute to dirty memory
either.
After this change, I'm unable to reproduce any of the added warnings or
hangs after ~1hour of running. Previously, the new warnings would start
immediately and hang would happen in under 5 minutes.
I'm also testing on ext3 now, and so far no problems there either. I
don't know whether this fixes the problem reported above, but it fixes a
real problem for me.
Cc: "Jorge Boncompte [DTI2]" <jorge@dti2.net>
Reported-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Cc: Jan Kara <jack@suse.cz>
Cc: <stable@kernel.org>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
KOSAKI Motohiro [Thu, 12 Mar 2009 21:31:36 +0000 (14:31 -0700)]
memcg: use correct scan number at reclaim
Even when page reclaim is under mem_cgroup, # of scan page is determined by
status of global LRU. Fix that.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Mark Brown [Thu, 12 Mar 2009 21:31:36 +0000 (14:31 -0700)]
mfd: add support for WM8351 revision B
No software visible difference from revision A.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Michael Spang [Thu, 12 Mar 2009 21:31:34 +0000 (14:31 -0700)]
acer-wmi: fix regression in backlight detection
Currently we disable the Acer WMI backlight device if there is no ACPI
backlight device. As a result, we end up with no backlight device at all.
We should instead disable it if there is an ACPI device, as the other
laptop drivers do. This regression was introduced in febf2d9 ("Acer-WMI:
fingers off backlight if video.ko is serving this functionality").
Each laptop driver with backlight support got a similar change around
febf2d9. The changes to the other drivers look correct; see e.g.
a598c82f for a similar but correct change. The regression is also in
2.6.28.
Signed-off-by: Michael Spang <mspang@csclub.uwaterloo.ca>
Acked-by: Thomas Renninger <trenn@suse.de>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Len Brown <len.brown@intel.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: <stable@kernel.org> [2.6.28.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ben Dooks [Thu, 12 Mar 2009 21:31:33 +0000 (14:31 -0700)]
mmc: s3cmci: fix s3c2410_dma_config() arguments.
The s3cmci driver is calling s3c2410_dma_config with incorrect data for
the DCON register. The S3C2410_DCON_HWTRIG is implicit in the channel
configuration and the device selection of S3C2410_DCON_CH0_SDI is
incorrect as the DMA system may not select channel 0.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Acked-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Michael Kerrisk [Thu, 12 Mar 2009 21:31:32 +0000 (14:31 -0700)]
MAINTAINERS: downgrade support for man-pages
Unfortunately, Linux Foundation funding for my work on
man-pages/testing/doc under the auspices of the LF documentation
fellowship unfortunately ran out a short while ago (after earlier attempts
to seek funding, only Google stepped forward with a bit of further funding
for the position), so the patch below acknowledges something closer to
reality.
Unfortunately, there will (probably very) soon be a further downgrade from
"Maintained" to "Odd Fixes" or "Orphan", unless some funding miracle
occurs. So, if anyone is looking to become man-pages maintainer, there
may soon be an opening (okay, don't trample me in the rush ;-).)
Signed-off-by: Michael Kerrisk <mtk.manpages@googlemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Daniel Mack [Thu, 12 Mar 2009 21:31:30 +0000 (14:31 -0700)]
ds2760_battery.c: fix division by zero
The 'battery remaining capacity' calculation in
drivers/power/ds2760_battery.c lacks a parameter check to a division
operation which causes the kernel to oops on my board.
[ 21.233750] Division by zero in kernel.
[ 21.237646] [<
c002955c>] (__div0+0x0/0x20) from [<
c012561c>] (Ldiv0+0x8/0x10)
[ 21.244816] [<
c01bef34>] (ds2760_battery_read_status+0x0/0x2a4) from [<
c01bf3a4>] (ds2760_battery_get_property+0x30/0xdc)
[ 21.255803] r8:
c03a22c0 r7:
c7886100 r6:
00000009 r5:
c782fe7c r4:
c7886084
[ 21.262518] [<
c01bf374>] (ds2760_battery_get_property+0x0/0xdc) from [<
c01bde98>] (power_supply_show_property+0x48/0x114)
[ 21.273480] r6:
c7996000 r5:
00000009 r4:
00000000
[ 21.278111] [<
c01bde50>] (power_supply_show_property+0x0/0x114) from [<
c01be158>] (power_supply_uevent+0x188/0x280)
[ 21.288537] r8:
00000001 r7:
c7886100 r6:
c7996000 r5:
000000b4 r4:
00000000
[ 21.295222] [<
c01bdfd0>] (power_supply_uevent+0x0/0x280) from [<
c015c664>] (dev_uevent+0xd4/0x10c)
[ 21.304199] [<
c015c590>] (dev_uevent+0x0/0x10c) from [<
c0128440>] (kobject_uevent_env+0x180/0x390)
[ 21.313170] r5:
00000000 r4:
c78860ac
[ 21.316725] [<
c01282c0>] (kobject_uevent_env+0x0/0x390) from [<
c0128664>] (kobject_uevent+0x14/0x18)
[ 21.325850] [<
c0128650>] (kobject_uevent+0x0/0x18) from [<
c01bdc34>] (power_supply_changed_work+0x5c/0x70)
[ 21.335506] [<
c01bdbd8>] (power_supply_changed_work+0x0/0x70) from [<
c004d290>] (run_workqueue+0xbc/0x144)
[ 21.345167] r4:
c7812040
[ 21.347716] [<
c004d1d4>] (run_workqueue+0x0/0x144) from [<
c004d94c>] (worker_thread+0xa8/0xbc)
[ 21.356296] r7:
c7812040 r6:
c7820b00 r5:
c782ffa4 r4:
c7812048
[ 21.361957] [<
c004d8a4>] (worker_thread+0x0/0xbc) from [<
c0051008>] (kthread+0x5c/0x94)
[ 21.369971] r7:
00000000 r6:
c004d8a4 r5:
c7812040 r4:
c782e000
[ 21.375612] [<
c0050fac>] (kthread+0x0/0x94) from [<
c00403d0>] (do_exit+0x0/0x688)
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Szabolcs Gyurko <szabolcs.gyurko@tlt.hu>
Acked-by: Matt Reimer <mreimer@vpop.net>
Acked-by: Anton Vorontsov <cbou@mail.ru>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Li Zefan [Thu, 12 Mar 2009 21:31:29 +0000 (14:31 -0700)]
vfs: add missing unlock in sget()
In sget(), destroy_super(s) is called with s->s_umount held, which makes
lockdep unhappy.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Oleg Nesterov [Thu, 12 Mar 2009 21:31:28 +0000 (14:31 -0700)]
pipe_rdwr_fasync: fix the error handling to prevent the leak/crash
If the second fasync_helper() fails, pipe_rdwr_fasync() returns the error
but leaves the file on ->fasync_readers.
This was always wrong, but since
233e70f4228e78eb2f80dc6650f65d3ae3dbf17c
"saner FASYNC handling on file close" we have the new problem. Because in
this case setfl() doesn't set FASYNC bit, __fput() will not do
->fasync(0), and we leak fasync_struct with ->fa_file pointing to the
freed file.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Daniel Mack [Thu, 12 Mar 2009 21:31:25 +0000 (14:31 -0700)]
drivers/w1/masters/w1-gpio.c: fix read_bit()
W1 master implementations are expected to return 0 or 1 from their
read_bit() function. However, not all platforms do return these values
from gpio_get_value() - namely PXAs won't. Hence the w1 gpio-master needs
to break the result down to 0 or 1 itself.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Ville Syrjala <syrjala@sci.fi>
Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
akpm@linux-foundation.org [Thu, 12 Mar 2009 21:31:24 +0000 (14:31 -0700)]
uml: fix WARNING: vmlinux: 'memcpy' exported twice
Fix the following warning on x86_64:
LD vmlinux.o
MODPOST vmlinux.o
WARNING: vmlinux: 'memcpy' exported twice. Previous export was in vmlinux
For x86_64, this symbol is already exported from arch/um/sys-x86_64/ksyms.c.
Reported-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Tested-by: Boaz Harrosh <bharrosh@panasas.com>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Renzo Davoli [Thu, 12 Mar 2009 21:31:23 +0000 (14:31 -0700)]
UML on UML fixed: it did not start
It is currently impossible to run a user-mode linux machine inside another
user-mode linux (UML on UML). It breaks after a few instructions. When
it tries to check whether SYSEMU is installed (the inner) UML receives an
inconsistent result (from the outer UML).
This is the output of a broken attempt:
$ ./linux mem=256m ubd0=cow
Locating the bottom of the address space ... 0x0
Locating the top of the address space ... 0xc0000000
Core dump limits :
soft - 0
hard - NONE
Checking that ptrace can change system call numbers...OK
Checking ptrace new tags for syscall emulation...unsupported
Checking syscall emulation patch for ptrace...check_sysemu : expected SIGTRAP, got status = 256
$
The problem is the following:
PTRACE_SYSCALL/SINGLESTEP is currently managed inside arch_ptrace for ARCH=um.
PTRACE_SYSEMU/SUSEMU_SINGLESTEP is not captured in arch_ptrace's switch,
therefore it is erroneously passed back to ptrace_request (in
kernel/ptrace).
This simple patch simply forces ptrace to return an error on
PTRACE_SYSEMU/SUSEMU_SINGLESTEP as it is unsupported on ARCH=um, and fixes
the problem.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Renzo Davoli <renzo@cs.unibo.it>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Russell King [Thu, 12 Mar 2009 17:03:48 +0000 (17:03 +0000)]
[ARM] Fix virtual to physical translation macro corner cases
The current use of these macros works well when the conversion is
entirely linear. In this case, we can be assured that the following
holds true:
__va(p + s) - s = __va(p)
However, this is not always the case, especially when there is a
non-linear conversion (eg, when there is a 3.5GB hole in memory.)
In this case, if 's' is the size of the region (eg, PAGE_SIZE) and
'p' is the final page, the above is most definitely not true.
So, we must ensure that __va() and __pa() are only used with valid
kernel direct mapped RAM addresses. This patch tweaks the code
to achieve this.
Tested-by: Charles Moschel <fred99@carolina.rr.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King [Thu, 12 Mar 2009 18:03:01 +0000 (18:03 +0000)]
[ARM] update mach-types
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Uwe Kleine-König [Thu, 12 Mar 2009 17:03:16 +0000 (18:03 +0100)]
[ARM] 5421/1: ftrace: fix crash due to tracing of __naked functions
This is a fix for the following crash observed in 2.6.29-rc3:
http://lkml.org/lkml/2009/1/29/150
On ARM it doesn't make sense to trace a naked function because then
mcount is called without stack and frame pointer being set up and there
is no chance to restore the lr register to the value before mcount was
called.
Reported-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Tested-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Cc: Abhishek Sagar <sagar.abhishek@gmail.com>
Cc: Steven Rostedt <rostedt@home.goodmis.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King [Thu, 12 Mar 2009 21:32:52 +0000 (21:32 +0000)]
Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6
Alex Chiang [Sun, 8 Mar 2009 02:35:47 +0000 (19:35 -0700)]
PCIe: portdrv: call pci_disable_device during remove
The PCIe port driver calls pci_enable_device() during probe but
never calls pci_disable_device() during remove.
Cc: stable@kernel.org
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Prakash Punnoor [Fri, 6 Mar 2009 09:10:35 +0000 (10:10 +0100)]
pci: Fix typo in message while disabling HT MSI mapping
"Enabling" should read "Disabling"
Signed-off-by: Prakash Punnoor <prakash@punnoor.de>
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Prakash Punnoor [Thu, 5 Mar 2009 23:45:12 +0000 (00:45 +0100)]
pci: don't disable too many HT MSI mapping
Prakash's system needs MSI disabled on some bridges, but not all.
This seems to be the minimal fix for 2.6.29, but should be replaced
during 2.6.30.
Signed-off-by: Prakash Punnoor <prakash@punnoor.de>
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Michael Ellerman [Fri, 6 Mar 2009 03:39:14 +0000 (14:39 +1100)]
powerpc/pseries: The RPA PCI hotplug driver depends on EEH
The RPA PCI hotplug driver calls EEH routines, so should depend on
EEH. Also PPC_PSERIES implies PPC64, so remove that.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Alex Chiang [Fri, 6 Mar 2009 02:28:40 +0000 (19:28 -0700)]
PCIe: AER: during disable, check subordinate before walking
Commit
47a8b0cc (Enable PCIe AER only after checking firmware
support) wants to walk the PCI bus in the remove path to disable
AER, and calls pci_walk_bus for downstream bridges.
Unfortunately, in the remove path, we remove devices and bridges
in a depth-first manner, starting with the furthest downstream
bridge and working our way backwards.
The furthest downstream bridges will not have a dev->subordinate,
and we hit a NULL deref in pci_walk_bus.
Check for dev->subordinate first before attempting to walk the
PCI hierarchy below us.
Acked-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Alexander Duyck [Thu, 5 Mar 2009 18:57:28 +0000 (13:57 -0500)]
PCI: Add PCI quirk to disable L0s ASPM state for 82575 and 82598
This patch is intended to disable L0s ASPM link state for 82598 (ixgbe)
parts due to the fact that it is possible to corrupt TX data when coming
back out of L0s on some systems. The workaround had been added for 82575
(igb) previously, but did not use the ASPM api. This quirk uses the ASPM
api to prevent the ASPM subsystem from re-enabling the L0s state.
Instead of adding the fix in igb to the ixgbe driver as well it was
decided to move it into a pci quirk. It is necessary to move the fix out
of the driver and into a pci quirk in order to prevent the issue from
occuring prior to driver load to handle the possibility of the device being
passed to a VM via direct assignment.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CC: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Trond Myklebust [Thu, 12 Mar 2009 18:51:32 +0000 (14:51 -0400)]
NFS: Fix the fix to Bugzilla #11061, when IPv6 isn't defined...
Stephen Rothwell reports:
Today's linux-next build (powerpc ppc64_defconfig) failed like this:
fs/built-in.o: In function `.nfs_get_client':
client.c:(.text+0x115010): undefined reference to `.__ipv6_addr_type'
Fix by moving the IPV6 specific parts of commit
d7371c41b0cda782256b1df759df4e8d4724584c ("Bug 11061, NFS mounts dropped")
into the '#ifdef IPV6..." section.
Also fix up a couple of formatting issues.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Linus Torvalds [Thu, 12 Mar 2009 16:27:53 +0000 (09:27 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sunhme: Fix qfe parent detection.
sparc64: Fix lost interrupts on sun4u.
sparc64: wait_event_interruptible_timeout may return -ERESTARTSYS
jsflash: stop defining MAJOR_NR
Linus Torvalds [Thu, 12 Mar 2009 16:25:10 +0000 (09:25 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
MIPS: IP27: Enable RAID5 module
MIPS: TXx9: update defconfigs
MIPS: NEC VR5500 processor support fixup
MIPS: Fix build of non-CONFIG_SYSVIPC version of sys_32_ipc
Andrew Klossner [Thu, 12 Mar 2009 12:36:39 +0000 (13:36 +0100)]
hwmon: (f75375s) Remove unnecessary and confusing initialization
f75375_probe calls i2c_get_clientdata to initialize the data pointer,
but there isn't yet any client data to get, and the value is never
used before the variable is assigned a new value seven lines later.
The call doesn't hurt anything and wastes only a couple of cycles.
The reason to fix it is because this module serves as an example to
hackers writing new hwmon drivers, and this part of the example is
confusing.
Signed-off-by: Andrew Klossner <andrew@cesa.opbu.xerox.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Thu, 12 Mar 2009 12:36:39 +0000 (13:36 +0100)]
hwmon: (it87) Properly decode -128 degrees C temperature
The it87 driver is reporting -128 degrees C as +128 degrees C.
That's not a terribly likely temperature value but let's still
get it right, especially when it simplifies the code.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Darrick J. Wong [Thu, 12 Mar 2009 12:36:38 +0000 (13:36 +0100)]
hwmon: (lm90) Document support for the MAX6648/6692 chips
Update documentation to prevent further confusion/duplication.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Thu, 12 Mar 2009 12:36:38 +0000 (13:36 +0100)]
hwmon: (abituguru3) Fix I/O error handling
Fix a logic bug reported by Roel Kluin, by rewriting the error
handling code in a clearer way.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Alistair John Strachan <alistair@devzero.co.uk>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Rusty Russell [Thu, 12 Mar 2009 20:35:44 +0000 (14:35 -0600)]
cpumask: mm_cpumask for accessing the struct mm_struct's cpu_vm_mask.
This allows us to change the representation (to a dangling bitmap or
cpumask_var_t) without breaking all the callers: they can use
mm_cpumask() now and won't see a difference as the changes roll into
linux-next.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Rusty Russell [Thu, 12 Mar 2009 20:35:43 +0000 (14:35 -0600)]
cpumask: tsk_cpumask for accessing the struct task_struct's cpus_allowed.
This allows us to change the representation (to a dangling bitmap or
cpumask_var_t) without breaking all the callers: they can use
tsk_cpumask() now and won't see a difference as the changes roll into
linux-next.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Phillip Lougher [Thu, 12 Mar 2009 03:23:48 +0000 (03:23 +0000)]
Squashfs: Valid filesystems are flagged as bad by the corrupted fs patch
The corrupted filesystem patch added a check against zlib trying to
output too much data in the presence of data corruption. This check
triggered if zlib_inflate asked to be called again (Z_OK) with
avail_out == 0 and no more output buffers available. This check proves
to be rather dumb, as it incorrectly catches the case where zlib has
generated all the output, but there are still input bytes to be processed.
This patch does a number of things. It removes the original check and
replaces it with code to not move to the next output buffer if there
are no more output buffers available, relying on zlib to error if it
wants an extra output buffer in the case of data corruption. It
also replaces the Z_NO_FLUSH flag with the more correct Z_SYNC_FLUSH
flag, and makes the error messages more understandable to
non-technical users.
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
Reported-by: Stefan Lippers-Hollmann <s.L-H@gmx.de>
Linus Torvalds [Wed, 11 Mar 2009 21:29:03 +0000 (14:29 -0700)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
* 'for-linus' of git://oss.sgi.com/xfs/xfs:
xfs: only issues a cache flush on unmount if barriers are enabled
xfs: prevent lockdep false positive in xfs_iget_cache_miss
xfs: prevent kernel crash due to corrupted inode log format
Ralf Baechle [Wed, 11 Mar 2009 20:08:50 +0000 (21:08 +0100)]
MIPS: IP27: Enable RAID5 module
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Atsushi Nemoto [Wed, 4 Mar 2009 14:45:44 +0000 (23:45 +0900)]
MIPS: TXx9: update defconfigs
Enable following features:
* MTD (PHYSMAP)
* LED (LEDS_GPIO)
* RBTX4939
* 7SEGLED
* IDE (IDE_TX4938, IDE_TX4939)
* SMC91X
* RTC_DRV_TX4939
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Shinya Kuribayashi [Tue, 3 Mar 2009 09:05:51 +0000 (18:05 +0900)]
MIPS: NEC VR5500 processor support fixup
Current VR5500 processor support lacks of some functions which are
expected to be configured/synthesized on arch initialization.
Here're some VR5500A spec notes:
* All execution hazards are handled in hardware.
* Once VR5500A stops the operation of the pipeline by WAIT instruction,
it could return from the standby mode only when either a reset, NMI
request, or all enabled interrupts is/are detected. In other words,
if interrupts are disabled by Status.IE=0, it keeps in standby mode
even when interrupts are internally asserted.
Notes on WAIT: The operation of the processor is undefined if WAIT
insn is in the branch delay slot. The operation is also undefined
if WAIT insn is executed when Status.EXL and Status.ERL are set to 1.
* VR5500A core only implements the Load prefetch.
With these changes, it boots fine.
Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>