]> Pileus Git - ~andy/linux/log
~andy/linux
15 years agoPhonet: generate Netlink RTM_DELADDR when destroying a device
Rémi Denis-Courmont [Wed, 24 Jun 2009 01:07:45 +0000 (01:07 +0000)]
Phonet: generate Netlink RTM_DELADDR when destroying a device

Netlink address deletion events were not sent when a network device
vanished neither when Phonet was unloaded.

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoPhonet: publicize the Netlink notification function
Rémi Denis-Courmont [Wed, 24 Jun 2009 01:07:44 +0000 (01:07 +0000)]
Phonet: publicize the Netlink notification function

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoRevert "veth: prevent oops caused by netdev destructor"
David S. Miller [Thu, 25 Jun 2009 09:45:42 +0000 (02:45 -0700)]
Revert "veth: prevent oops caused by netdev destructor"

This reverts commit ae0e8e82205c903978a79ebf5e31c670b61fa5b4.

This change had two problems:

1) Since it frees the stats in the drivers' close method, we
   can OOPS in the transmit routine.

2) stats are no longer remembered across ifdown/ifup which
   disagrees with how every other device operates.

Thanks to analysis and test patch from Serge E. Hallyn
and initial OOPS report by Sachin Sant.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoring-buffer: Make it generally available
Paul Mundt [Thu, 25 Jun 2009 05:30:12 +0000 (14:30 +0900)]
ring-buffer: Make it generally available

In hunting down the cause for the hwlat_detector ring buffer spew in
my failed -next builds it became obvious that folks are now treating
ring_buffer as something that is generic independent of tracing and thus,
suitable for public driver consumption.

Given that there are only a few minor areas in ring_buffer that have any
reliance on CONFIG_TRACING or CONFIG_FUNCTION_TRACER, provide stubs for
those and make it generally available.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Cc: Jon Masters <jcm@jonmasters.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <20090625053012.GB19944@linux-sh.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoftrace: Remove duplicate newline
Li Zefan [Thu, 25 Jun 2009 06:05:27 +0000 (14:05 +0800)]
ftrace: Remove duplicate newline

Before:
  # echo 'sys_open:traceon:' > set_ftrace_filter
  # echo 'sys_close:traceoff:5' > set_ftrace_filter
  # cat set_ftrace_filter
  #### all functions enabled ####
  sys_open:traceon:unlimited

  sys_close:traceoff:count=0

After:
  # cat set_ftrace_filter
  #### all functions enabled ####
  sys_open:traceon:unlimited
  sys_close:traceoff:count=0

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4A4313A7.7030105@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years ago[CIFS] cleanup asn handling for ntlmssp
Steve French [Thu, 25 Jun 2009 03:04:20 +0000 (03:04 +0000)]
[CIFS] cleanup asn handling for ntlmssp

Also removes obsolete distinction between rawntlmssp and ntlmssp (in asn/SPNEGO)
since as jra noted we can always send raw ntlmssp in session setup now.

remove check for experimental runtime flag (/proc/fs/cifs/Experimental) in
ntlmssp path.

Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years ago[CIFS] Copy struct *after* setting the port, instead of before.
Simo Leone [Thu, 25 Jun 2009 02:44:43 +0000 (02:44 +0000)]
[CIFS] Copy struct *after* setting the port, instead of before.

Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Simo Leone <simo@archlinux.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agocifs: remove rw/ro options
Jeff Layton [Thu, 25 Jun 2009 04:56:55 +0000 (00:56 -0400)]
cifs: remove rw/ro options

cifs: remove rw/ro options

These options are handled at the VFS layer. They only ever set the
option in the smb_vol struct. Nothing was ever done with them afterward
anyway.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agocifs: fix problems with earlier patches
Jeff Layton [Thu, 25 Jun 2009 04:56:54 +0000 (00:56 -0400)]
cifs: fix problems with earlier patches

cifs: fix problems with earlier patches

cifs_show_address hasn't been introduced yet, and fix a typo that was
silently fixed by a later patch in the series.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agocifs: have cifs parse scope_id out of IPv6 addresses and use it
Jeff Layton [Thu, 11 Jun 2009 14:27:31 +0000 (10:27 -0400)]
cifs: have cifs parse scope_id out of IPv6 addresses and use it

This patch has CIFS look for a '%' in an IPv6 address. If one is
present then it will try to treat that value as a numeric interface
index suitable for stuffing into the sin6_scope_id field.

This should allow people to mount servers on IPv6 link-local addresses.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: David Holder <david@erion.co.uk>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agocpmac: fix compilation failure introduced with netdev_ops conversion
Florian Fainelli [Wed, 24 Jun 2009 23:32:33 +0000 (16:32 -0700)]
cpmac: fix compilation failure introduced with netdev_ops conversion

This patch fixes and obvious typo in the netdev_ops initialization:
ndo_so_ioctl should be ndo_do_ioctl.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipsec: Fix name of CAST algorithm
Herbert Xu [Wed, 24 Jun 2009 10:55:41 +0000 (03:55 -0700)]
ipsec: Fix name of CAST algorithm

Our CAST algorithm is called cast5, not cast128.  Clearly nobody
has ever used it :)

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years ago[CIFS] Do not send tree disconnect if session is already disconnected
Steve French [Thu, 25 Jun 2009 00:29:21 +0000 (00:29 +0000)]
[CIFS] Do not send tree disconnect if session is already disconnected

Noticed this when tree connect timed out (due to Samba server crash) -
we try to send a tree disconnect for a tid that does not exist
since we don't have a valid tree id yet. This checks that the
session is valid before sending the tree disconnect to handle
this case.

Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agoLinux 2.6.31-rc1 v2.6.31-rc1
Linus Torvalds [Wed, 24 Jun 2009 23:25:37 +0000 (16:25 -0700)]
Linux 2.6.31-rc1

15 years agoRevert "PCI: use ACPI _CRS data by default"
Linus Torvalds [Wed, 24 Jun 2009 23:23:03 +0000 (16:23 -0700)]
Revert "PCI: use ACPI _CRS data by default"

This reverts commit 9e9f46c44e487af0a82eb61b624553e2f7118f5b.

Quoting from the commit message:

 "At this point, it seems to solve more problems than it causes, so let's
  try using it by default.  It's an easy revert if it ends up causing
  trouble."

And guess what? The _CRS code causes trouble.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge git://git.infradead.org/battery-2.6
Linus Torvalds [Wed, 24 Jun 2009 21:35:57 +0000 (14:35 -0700)]
Merge git://git.infradead.org/battery-2.6

* git://git.infradead.org/battery-2.6:
  da9030_battery: Fix race between event handler and monitor
  Add MAX17040 Fuel Gauge driver
  w1: ds2760_battery: add support for sleep mode feature
  w1: ds2760: add support for EEPROM read and write
  ds2760_battery: cleanups in ds2760_battery_probe()

15 years agoMerge branches 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro...
Linus Torvalds [Wed, 24 Jun 2009 21:17:14 +0000 (14:17 -0700)]
Merge branches 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/{vfs-2.6,audit-current}

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  another race fix in jfs_check_acl()
  Get "no acls for this inode" right, fix shmem breakage
  inline functions left without protection of ifdef (acl)

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
  audit: inode watches depend on CONFIG_AUDIT not CONFIG_AUDIT_SYSCALL

15 years agoanother race fix in jfs_check_acl()
Al Viro [Wed, 24 Jun 2009 21:02:42 +0000 (17:02 -0400)]
another race fix in jfs_check_acl()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoGet "no acls for this inode" right, fix shmem breakage
Al Viro [Wed, 24 Jun 2009 20:58:48 +0000 (16:58 -0400)]
Get "no acls for this inode" right, fix shmem breakage

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoaudit: inode watches depend on CONFIG_AUDIT not CONFIG_AUDIT_SYSCALL
Eric Paris [Wed, 24 Jun 2009 20:09:01 +0000 (16:09 -0400)]
audit: inode watches depend on CONFIG_AUDIT not CONFIG_AUDIT_SYSCALL

Even though one cannot make use of the audit watch code without
CONFIG_AUDIT_SYSCALL the spaghetti nature of the audit code means that
the audit rule filtering requires that it at least be compiled.

Thus build the audit_watch code when we build auditfilter like it was
before cfcad62c74abfef83762dc05a556d21bdf3980a2

Clearly this is a point of potential future cleanup..

Reported-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoinline functions left without protection of ifdef (acl)
Markus Trippelsdorf [Wed, 24 Jun 2009 20:28:52 +0000 (22:28 +0200)]
inline functions left without protection of ifdef (acl)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoMerge branch 'futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 24 Jun 2009 20:33:19 +0000 (13:33 -0700)]
Merge branch 'futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  futex: Fix the write access fault problem for real

15 years agofutex: Fix the write access fault problem for real
Thomas Gleixner [Thu, 11 Jun 2009 21:15:43 +0000 (23:15 +0200)]
futex: Fix the write access fault problem for real

commit 64d1304a64 (futex: setup writeable mapping for futex ops which
modify user space data) did address only half of the problem of write
access faults.

The patch was made on two wrong assumptions:

1) access_ok(VERIFY_WRITE,...) would actually check write access.

   On x86 it does _NOT_. It's a pure address range check.

2) a RW mapped region can not go away under us.

   That's wrong as well. Nobody can prevent another thread to call
   mprotect(PROT_READ) on that region where the futex resides. If that
   call hits between the get_user_pages_fast() verification and the
   actual write access in the atomic region we are toast again.

The solution is to not rely on access_ok and get_user() for any write
access related fault on private and shared futexes. Instead we need to
fault it in with verification of write access.

There is no generic non destructive write mechanism which would fault
the user page in trough a #PF, but as we already know that we will
fault we can as well call get_user_pages() directly and avoid the #PF
overhead.

If get_user_pages() returns -EFAULT we know that we can not fix it
anymore and need to bail out to user space.

Remove a bunch of confusing comments on this issue as well.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org
15 years agoSLUB: Don't pass __GFP_FAIL for the initial allocation
Pekka Enberg [Wed, 24 Jun 2009 18:59:51 +0000 (21:59 +0300)]
SLUB: Don't pass __GFP_FAIL for the initial allocation

SLUB uses higher order allocations by default but falls back to small
orders under memory pressure. Make sure the GFP mask used in the initial
allocation doesn't include __GFP_NOFAIL.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoDon't warn about order-1 allocations with __GFP_NOFAIL
Linus Torvalds [Wed, 24 Jun 2009 19:16:49 +0000 (12:16 -0700)]
Don't warn about order-1 allocations with __GFP_NOFAIL

Traditionally, we never failed small orders (even regardless of any
__GFP_NOFAIL flags), and slab will allocate order-1 allocations even for
small allocations that could fit in a single page (in order to avoid
excessive fragmentation).

Maybe we should remove this warning entirely, but before making that
judgement, at least limit it to bigger allocations.

Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Wed, 24 Jun 2009 17:47:38 +0000 (10:47 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  Staging: octeon-ethernet: Fix race freeing transmit buffers.
  Staging: octeon-ethernet: Convert to use net_device_ops.
  MIPS: Cavium: Add CPU hotplugging code.
  MIPS: SMP: Allow suspend and hibernation if CPU hotplug is available
  MIPS: Add arch generic CPU hotplug
  DMA: txx9dmac: use dma_unmap_single if DMA_COMPL_{SRC,DEST}_UNMAP_SINGLE set
  MIPS: Sibyte: Fix build error if CONFIG_SERIAL_SB1250_DUART is undefined.
  MIPS: MIPSsim: Fix build error if MSC01E_INT_BASE is undefined.
  MIPS: Hibernation: Remove SMP TLB and cacheflushing code.
  MIPS: Build fix - include <linux/smp.h> into all smp_processor_id() users.
  MIPS: bug.h Build fix - include <linux/compiler.h>.

15 years agoStaging: octeon-ethernet: Fix race freeing transmit buffers.
David Daney [Tue, 23 Jun 2009 23:20:56 +0000 (16:20 -0700)]
Staging: octeon-ethernet: Fix race freeing transmit buffers.

The existing code had the following race:

Thread-1                       Thread-2

inc/read in_use
                               inc/read in_use
inc tx_free_list[qos].len
                               inc tx_free_list[qos].len

The actual in_use value was incremented twice, but thread-1 is going
to free memory based on its stale value, and will free one too many
times.  The result is that memory is freed back to the kernel while
its packet is still in the transmit buffer.  If the memory is
overwritten before it is transmitted, the hardware will put a valid
checksum on it and send it out (just like it does with good packets).
If by chance the TCP flags are clobbered but not the addresses or
ports, the result can be a broken TCP stream.

The fix is to track the number of freed packets in a single location
(a Fetch-and-Add Unit register).  That way it can never get out of sync
with itself.

We try to free up to MAX_SKB_TO_FREE (currently 10) buffers at a time.
If fewer are available we adjust the free count with the difference.
The action of claiming buffers to free is atomic so two threads cannot
claim the same buffers.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoStaging: octeon-ethernet: Convert to use net_device_ops.
David Daney [Tue, 23 Jun 2009 18:34:08 +0000 (11:34 -0700)]
Staging: octeon-ethernet: Convert to use net_device_ops.

Convert the driver to use net_device_ops as it is now mandatory.

Also compensate for the removal of struct sk_buff's dst field.

The changes are mostly mechanical, the content of ethernet-common.c
was moved to ethernet.c and ethernet-common.{c,h} are removed.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Cavium: Add CPU hotplugging code.
Ralf Baechle [Tue, 23 Jun 2009 09:36:38 +0000 (10:36 +0100)]
MIPS: Cavium: Add CPU hotplugging code.

Thanks to Cavium Inc. for the code contribution and help.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: SMP: Allow suspend and hibernation if CPU hotplug is available
Ralf Baechle [Tue, 23 Jun 2009 09:20:56 +0000 (10:20 +0100)]
MIPS: SMP: Allow suspend and hibernation if CPU hotplug is available

The SMP implementation of suspend and hibernate depends on CPU hotplugging.
In the past we didn't have CPU hotplug so suspend and hibernation were not
possible on SMP systems.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Add arch generic CPU hotplug
Ralf Baechle [Tue, 23 Jun 2009 09:00:31 +0000 (10:00 +0100)]
MIPS: Add arch generic CPU hotplug

Each platform has to add support for CPU hotplugging itself by providing
suitable definitions for the cpu_disable and cpu_die of the smp_ops
methods and setting SYS_SUPPORTS_HOTPLUG_CPU.  A platform should only set
SYS_SUPPORTS_HOTPLUG_CPU once all it's smp_ops definitions have the
necessary changes.  This patch contains the changes to the dummy smp_ops
definition for uni-processor systems.

Parts of the code contributed by Cavium Inc.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoDMA: txx9dmac: use dma_unmap_single if DMA_COMPL_{SRC,DEST}_UNMAP_SINGLE set
Atsushi Nemoto [Wed, 17 Jun 2009 20:08:31 +0000 (13:08 -0700)]
DMA: txx9dmac: use dma_unmap_single if DMA_COMPL_{SRC,DEST}_UNMAP_SINGLE set

This patch does not change actual behaviour since dma_unmap_page is just
an alias of dma_unmap_single on MIPS.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Sibyte: Fix build error if CONFIG_SERIAL_SB1250_DUART is undefined.
Ralf Baechle [Mon, 22 Jun 2009 15:17:52 +0000 (16:17 +0100)]
MIPS: Sibyte: Fix build error if CONFIG_SERIAL_SB1250_DUART is undefined.

This fixes kernel.org bugzilla 13596, see
http://bugzilla.kernel.org/show_bug.cgi?id=13596

Reported-by: dvice_null@yahoo.com
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: MIPSsim: Fix build error if MSC01E_INT_BASE is undefined.
Ralf Baechle [Mon, 22 Jun 2009 14:48:27 +0000 (15:48 +0100)]
MIPS: MIPSsim: Fix build error if MSC01E_INT_BASE is undefined.

This fixes kernel.org bugzilla 13595, see
http://bugzilla.kernel.org/show_bug.cgi?id=13595

Reported-by: dvice_null@yahoo.com
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Hibernation: Remove SMP TLB and cacheflushing code.
Ralf Baechle [Fri, 19 Jun 2009 14:01:44 +0000 (15:01 +0100)]
MIPS: Hibernation: Remove SMP TLB and cacheflushing code.

We can't perform any flushes on SMP from swsusp_arch_resume because
interrupts are disabled.  A cross-CPU flush is unnecessary anyway
because all but the local CPU have already been disabled.  A local
flush is not needed either because we didn't change any mappings.  So
just delete the code.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Build fix - include <linux/smp.h> into all smp_processor_id() users.
Ralf Baechle [Fri, 19 Jun 2009 13:05:26 +0000 (14:05 +0100)]
MIPS: Build fix - include <linux/smp.h> into all smp_processor_id() users.

Some of the were relying into smp.h being dragged in by another header
which of course is fragile.  <asm/cpu-info.h> uses smp_processor_id()
only in macros and including smp.h there leads to an include loop, so
don't change cpu-info.h.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: bug.h Build fix - include <linux/compiler.h>.
Ralf Baechle [Fri, 19 Jun 2009 12:51:28 +0000 (13:51 +0100)]
MIPS: bug.h Build fix - include <linux/compiler.h>.

In the past this file somehow used to be dragged in.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm
Linus Torvalds [Wed, 24 Jun 2009 17:26:54 +0000 (10:26 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm

* git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm: (48 commits)
  dm mpath: change to be request based
  dm: disable interrupt when taking map_lock
  dm: do not set QUEUE_ORDERED_DRAIN if request based
  dm: enable request based option
  dm: prepare for request based option
  dm raid1: add userspace log
  dm: calculate queue limits during resume not load
  dm log: fix create_log_context to use logical_block_size of log device
  dm target:s introduce iterate devices fn
  dm table: establish queue limits by copying table limits
  dm table: replace struct io_restrictions with struct queue_limits
  dm table: validate device logical_block_size
  dm table: ensure targets are aligned to logical_block_size
  dm ioctl: support cookies for udev
  dm: sysfs add suspended attribute
  dm table: improve warning message when devices not freed before destruction
  dm mpath: add service time load balancer
  dm mpath: add queue length load balancer
  dm mpath: add start_io and nr_bytes to path selectors
  dm snapshot: use barrier when writing exception store
  ...

15 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb
Linus Torvalds [Wed, 24 Jun 2009 17:26:24 +0000 (10:26 -0700)]
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb

* 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb:
  uwb: allow WLP to be used with IPv6.
  uwb: event_size should be signed

15 years agoMerge branch 'audit.b63' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit...
Linus Torvalds [Wed, 24 Jun 2009 17:22:57 +0000 (10:22 -0700)]
Merge branch 'audit.b63' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current

* 'audit.b63' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
  Fix rule eviction order for AUDIT_DIR
  Audit: clean up all op= output to include string quoting
  Audit: move audit_get_nd completely into audit_watch
  audit: seperate audit inode watches into a subfile
  Audit: clean up audit_receive_skb
  Audit: cleanup netlink mesg handling
  Audit: unify the printk of an skb when auditd not around
  Audit: dereferencing krule as if it were an audit_watch
  Audit: better estimation of execve record length
  Audit: fix audit watch use after free

15 years agoMAINTAINERS: Change mailing list info for CRIS
Jesper Nilsson [Wed, 24 Jun 2009 07:33:19 +0000 (09:33 +0200)]
MAINTAINERS: Change mailing list info for CRIS

Posting to the dev-etrax mailing list is only allowed for subscribers,
and the list is more geared toward user applications than kernel
developers.

Change to newly created mailing list for CRIS.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Wed, 24 Jun 2009 17:17:07 +0000 (10:17 -0700)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (72 commits)
  asus-laptop: remove EXPERIMENTAL dependency
  asus-laptop: use pr_fmt and pr_<level>
  eeepc-laptop: cpufv updates
  eeepc-laptop: sync eeepc-laptop with asus_acpi
  asus_acpi: Deprecate in favor of asus-laptop
  acpi4asus: update MAINTAINER and KConfig links
  asus-laptop: platform dev as parent for led and backlight
  eeepc-laptop: enable camera by default
  ACPI: Rename ACPI processor device bus ID
  acerhdf: Acer Aspire One fan control
  ACPI: video: DMI workaround broken Acer 7720 BIOS enabling display brightness
  ACPI: run ACPI device hot removal in kacpi_hotplug_wq
  ACPI: Add the reference count to avoid unloading ACPI video bus twice
  ACPI: DMI to disable Vista compatibility on some Sony laptops
  ACPI: fix a deadlock in hotplug case
  Show the physical device node of backlight class device.
  ACPI: pdc init related memory leak with physical CPU hotplug
  ACPI: pci_root: remove unused dev/fn information
  ACPI: pci_root: simplify list traversals
  ACPI: pci_root: use driver data rather than list lookup
  ...

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Wed, 24 Jun 2009 17:03:12 +0000 (10:03 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (23 commits)
  switch xfs to generic acl caching helpers
  helpers for acl caching + switch to those
  switch shmem to inode->i_acl
  switch reiserfs to inode->i_acl
  switch reiserfs to usual conventions for caching ACLs
  reiserfs: minimal fix for ACL caching
  switch nilfs2 to inode->i_acl
  switch btrfs to inode->i_acl
  switch jffs2 to inode->i_acl
  switch jfs to inode->i_acl
  switch ext4 to inode->i_acl
  switch ext3 to inode->i_acl
  switch ext2 to inode->i_acl
  add caching of ACLs in struct inode
  fs: Add new pre-allocation ioctls to vfs for compatibility with legacy xfs ioctls
  cleanup __writeback_single_inode
  ... and the same for vfsmount id/mount group id
  Make allocation of anon devices cheaper
  update Documentation/filesystems/Locking
  devpts: remove module-related code
  ...

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
Linus Torvalds [Wed, 24 Jun 2009 17:01:12 +0000 (10:01 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6:
  bnx2: Fix the behavior of ethtool when ONBOOT=no
  qla3xxx: Don't sleep while holding lock.
  qla3xxx: Give the PHY time to come out of reset.
  ipv4 routing: Ensure that route cache entries are usable and reclaimable with caching is off
  net: Move rx skb_orphan call to where needed
  ipv6: Use correct data types for ICMPv6 type and code
  net: let KS8842 driver depend on HAS_IOMEM
  can: let SJA1000 driver depend on HAS_IOMEM
  netxen: fix firmware init handshake
  netxen: fix build with without CONFIG_PM
  netfilter: xt_rateest: fix comparison with self
  netfilter: xt_quota: fix incomplete initialization
  netfilter: nf_log: fix direct userspace memory access in proc handler
  netfilter: fix some sparse endianess warnings
  netfilter: nf_conntrack: fix conntrack lookup race
  netfilter: nf_conntrack: fix confirmation race condition
  netfilter: nf_conntrack: death_by_timeout() fix

15 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux...
Linus Torvalds [Wed, 24 Jun 2009 16:57:10 +0000 (09:57 -0700)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6:
  udf: remove redundant tests on unsigned
  udf: Use device size when drive reported bogus number of written blocks

15 years agoRemove low_latency flag setting from nozomi and mxser drivers
Chuck Ebbert [Wed, 24 Jun 2009 17:35:13 +0000 (18:35 +0100)]
Remove low_latency flag setting from nozomi and mxser drivers

The kernel oopses if this flag is set.

[and neither driver should set it as they call tty_flip_buffer_push from IRQ
 paths so have always been buggy]

Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: fix tty_port_block_til_ready waiting
Jiri Slaby [Wed, 24 Jun 2009 17:35:05 +0000 (18:35 +0100)]
tty: fix tty_port_block_til_ready waiting

Since commit 3e3b5c087799e536871c8261b05bc28e4783c8da ("tty: use
prepare/finish_wait"), tty_port_block_til_ready() is using
prepare_to_wait()/finish_wait().  Those functions require that the
wait_queue_t be initialised with .func=autoremove_wake_function, via
DEFINE_WAIT().

But the conversion from DECLARE_WAITQUEUE() to DEFINE_WAIT() was not made,
so this code will oops in finish_wait().

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agopci: use pci_ioremap_bar() in drivers/serial
Arjan van de Ven [Wed, 24 Jun 2009 17:34:58 +0000 (18:34 +0100)]
pci: use pci_ioremap_bar() in drivers/serial

Use the newly introduced pci_ioremap_bar() function in drivers/serial.
pci_ioremap_bar() just takes a pci device and a bar number, with the goal
of making it really hard to get wrong, while also having a central place
to stick sanity checks.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosynclink_gt: fix transmit race and timeout
Paul Fulghum [Wed, 24 Jun 2009 17:34:51 +0000 (18:34 +0100)]
synclink_gt: fix transmit race and timeout

Fix race condition when adding transmit data to active DMA buffer ring
that can cause transmit stall.

Update transmit timeout when adding data to active DMA buffer ring.
Base transmit timeout on amount of buffered data instead of using fixed
value.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agojsm: clean up "serial: jsm: correctly support 4 8 port boards"
Andrew Morton [Wed, 24 Jun 2009 17:34:43 +0000 (18:34 +0100)]
jsm: clean up "serial: jsm: correctly support 4 8 port boards"

Remove unneeded casts.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agokgdb: kgdboc console poll hooks for serial_txx9 uart
Atsushi Nemoto [Wed, 24 Jun 2009 17:34:34 +0000 (18:34 +0100)]
kgdb: kgdboc console poll hooks for serial_txx9 uart

Implement the serial polling hooks for the serial_txx9 uart for use with
kgdboc.

This patch once got SOB from Jason on Jul 2008 and (perhaps) merged into
kgdb-next branch, but lost somewhere then.  I resend it now with Jason's
Acked-by.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Acked-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agox86: Fix uv bau sending buffer initialization
Cliff Wickman [Wed, 24 Jun 2009 14:41:59 +0000 (09:41 -0500)]
x86: Fix uv bau sending buffer initialization

The initialization of the UV Broadcast Assist Unit's sending
buffers was making an invalid assumption about the
initialization of an MMR that defines its address.

The BIOS will not be providing that MMR.  So
uv_activation_descriptor_init() should unconditionally set it.

Tested on UV simulator.

Signed-off-by: Cliff Wickman <cpw@sgi.com>
Cc: <stable@kernel.org> # for v2.6.30.x
LKML-Reference: <E1MJTfj-0005i1-W8@eag09.americas.sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoswitch xfs to generic acl caching helpers
Al Viro [Tue, 9 Jun 2009 17:29:39 +0000 (13:29 -0400)]
switch xfs to generic acl caching helpers

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agohelpers for acl caching + switch to those
Al Viro [Tue, 9 Jun 2009 16:11:54 +0000 (12:11 -0400)]
helpers for acl caching + switch to those

helpers: get_cached_acl(inode, type), set_cached_acl(inode, type, acl),
forget_cached_acl(inode, type).

ubifs/xattr.c needed includes reordered, the rest is a plain switchover.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoswitch shmem to inode->i_acl
Al Viro [Mon, 8 Jun 2009 23:56:00 +0000 (19:56 -0400)]
switch shmem to inode->i_acl

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoswitch reiserfs to inode->i_acl
Al Viro [Tue, 9 Jun 2009 01:07:04 +0000 (21:07 -0400)]
switch reiserfs to inode->i_acl

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoswitch reiserfs to usual conventions for caching ACLs
Al Viro [Tue, 9 Jun 2009 01:01:13 +0000 (21:01 -0400)]
switch reiserfs to usual conventions for caching ACLs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoreiserfs: minimal fix for ACL caching
Al Viro [Tue, 9 Jun 2009 00:46:54 +0000 (20:46 -0400)]
reiserfs: minimal fix for ACL caching

reiserfs uses NULL as "unknown" and ERR_PTR(-ENODATA) as "no ACL";
several codepaths store the former instead of the latter.

All those codepaths go through iset_acl() and all cases when it's
called with NULL acl are for the second variety, so the minimal
fix is to teach iset_acl() to deal with that.

Proper fix is to switch to more usual conventions and avoid back
and forth between internally used ERR_PTR(-ENODATA) and NULL
expected by the rest of the kernel.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoswitch nilfs2 to inode->i_acl
Al Viro [Mon, 8 Jun 2009 23:56:34 +0000 (19:56 -0400)]
switch nilfs2 to inode->i_acl

Actually, get rid of private analog, since nothing in there is
using ACLs at all so far.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoswitch btrfs to inode->i_acl
Al Viro [Mon, 8 Jun 2009 23:55:32 +0000 (19:55 -0400)]
switch btrfs to inode->i_acl

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoswitch jffs2 to inode->i_acl
Al Viro [Mon, 8 Jun 2009 23:55:12 +0000 (19:55 -0400)]
switch jffs2 to inode->i_acl

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoswitch jfs to inode->i_acl
Al Viro [Mon, 8 Jun 2009 23:54:52 +0000 (19:54 -0400)]
switch jfs to inode->i_acl

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoswitch ext4 to inode->i_acl
Al Viro [Mon, 8 Jun 2009 23:54:26 +0000 (19:54 -0400)]
switch ext4 to inode->i_acl

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoswitch ext3 to inode->i_acl
Al Viro [Mon, 8 Jun 2009 23:53:58 +0000 (19:53 -0400)]
switch ext3 to inode->i_acl

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoswitch ext2 to inode->i_acl
Al Viro [Mon, 8 Jun 2009 23:52:55 +0000 (19:52 -0400)]
switch ext2 to inode->i_acl

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoadd caching of ACLs in struct inode
Al Viro [Mon, 8 Jun 2009 23:50:45 +0000 (19:50 -0400)]
add caching of ACLs in struct inode

No helpers, no conversions yet.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agofs: Add new pre-allocation ioctls to vfs for compatibility with legacy xfs ioctls
Ankit Jain [Fri, 19 Jun 2009 18:28:07 +0000 (14:28 -0400)]
fs: Add new pre-allocation ioctls to vfs for compatibility with legacy xfs ioctls

This patch adds ioctls to vfs for compatibility with legacy XFS
pre-allocation ioctls (XFS_IOC_*RESVP*). The implementation
effectively invokes sys_fallocate for the new ioctls.
Also handles the compat_ioctl case.
Note: These legacy ioctls are also implemented by OCFS2.

[AV: folded fixes from hch]

Signed-off-by: Ankit Jain <me@ankitjain.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agocleanup __writeback_single_inode
Christoph Hellwig [Mon, 8 Jun 2009 11:35:40 +0000 (13:35 +0200)]
cleanup __writeback_single_inode

There is no reason to for the split between __writeback_single_inode and
__sync_single_inode, the former just does a couple of checks before
tail-calling the latter.  So merge the two, and while we're at it split
out the I_SYNC waiting case for data integrity writers, as it's
logically separate function.  Finally rename __writeback_single_inode to
writeback_single_inode.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago... and the same for vfsmount id/mount group id
Al Viro [Wed, 24 Jun 2009 07:12:00 +0000 (03:12 -0400)]
... and the same for vfsmount id/mount group id

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoMake allocation of anon devices cheaper
Al Viro [Wed, 24 Jun 2009 06:05:18 +0000 (02:05 -0400)]
Make allocation of anon devices cheaper

Standard trick - add a new variable (start) such that
for each n < start n is known to be busy.  Allocation can
skip checking everything in [0..start) and if it returns
n, we can set start to n + 1.  Freeing below start sets
start to what we'd just freed.

Of course, it still sucks if we do something like
free 0
allocate
allocate
in a loop - still O(n^2) time.  However, on saner loads it
improves the things a lot and the entire thing is not worth
the trouble of switching to something with better worst-case
behaviour.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoupdate Documentation/filesystems/Locking
Christoph Hellwig [Fri, 19 Jun 2009 18:22:37 +0000 (20:22 +0200)]
update Documentation/filesystems/Locking

The rules for locking in many superblock operations has changed
significantly, so update the documentation for it.  Also correct some
older updates and ommissions.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agodevpts: remove module-related code
H. Peter Anvin [Wed, 17 Jun 2009 04:15:04 +0000 (21:15 -0700)]
devpts: remove module-related code

These days, the devpts filesystem is closely integrated with the pty
memory management, and cannot be built as a module, even less removed
from the kernel.  Accordingly, remove all module-related stuff from
this filesystem.

[ v2: only remove code that's actually dead ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoVFS: Switch init_mount_tree() to use the new create_mnt_ns() helper
Trond Myklebust [Tue, 23 Jun 2009 21:29:49 +0000 (17:29 -0400)]
VFS: Switch init_mount_tree() to use the new create_mnt_ns() helper

Eliminates some duplicated code...

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agovfs: fix nd->root leak in do_filp_open()
J. R. Okajima [Thu, 18 Jun 2009 14:30:15 +0000 (23:30 +0900)]
vfs: fix nd->root leak in do_filp_open()

commit 2a737871108de9ba8930f7650d549f1383767f8b "Cache root in nameidata"
introduced a new member nd->root, but forgot to put it in do_filp_open().

Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoreiserfs: remove stray unlock_super in reiserfs_resize
Christoph Hellwig [Fri, 19 Jun 2009 08:30:07 +0000 (10:30 +0200)]
reiserfs: remove stray unlock_super in reiserfs_resize

Reiserfs doesn't use lock_super anywhere internally, and ->remount_fs
which calls reiserfs_resize does have it currently but also expects it
to be held on return, so there's no business for the unlock_super here.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked by Edward Shishkin <edward.shishkin@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoudf: remove redundant tests on unsigned
Roel Kluin [Mon, 22 Jun 2009 21:12:29 +0000 (23:12 +0200)]
udf: remove redundant tests on unsigned

first_block and goal are unsigned. When negative they are wrapped and caught by
the other test.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
15 years agotracing: Fix trace_buf_size boot option
Li Zefan [Wed, 24 Jun 2009 09:33:15 +0000 (17:33 +0800)]
tracing: Fix trace_buf_size boot option

We should be able to specify [KMG] when setting trace_buf_size
boot option, as documented in kernel-parameters.txt

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4A41F2DB.4020102@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoide cs5520: Initialize second port's interrupt number.
David S. Miller [Wed, 24 Jun 2009 09:36:17 +0000 (02:36 -0700)]
ide cs5520: Initialize second port's interrupt number.

In 86ccf37c6acd74cf7e4b7751ee045de19943c5a0 the driver was modified
to deal with the removal of the pciirq argument to ide_pci_setup_ports().

But in the conversion only the first port's IRQ gets setup.

Inspired by a patch by Bartlomiej Zolnierkiewicz., and with help from
Alan Cox.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotimer stats: Optimize by adding quick check to avoid function calls
Heiko Carstens [Tue, 23 Jun 2009 15:38:15 +0000 (17:38 +0200)]
timer stats: Optimize by adding quick check to avoid function calls

When the kernel is configured with CONFIG_TIMER_STATS but timer
stats are runtime disabled we still get calls to
__timer_stats_timer_set_start_info which initializes some
fields in the corresponding struct timer_list.

So add some quick checks in the the timer stats setup functions
to avoid function calls to __timer_stats_timer_set_start_info
when timer stats are disabled.

In an artificial workload that does nothing but playing ping
pong with a single tcp packet via loopback this decreases cpu
consumption by 1 - 1.5%.

This is part of a modified function trace output on SLES11:

 perl-2497  [00] 28630647177732388 [+  125]: sk_reset_timer <-tcp_v4_rcv
 perl-2497  [00] 28630647177732513 [+  125]: mod_timer <-sk_reset_timer
 perl-2497  [00] 28630647177732638 [+  125]: __timer_stats_timer_set_start_info <-mod_timer
 perl-2497  [00] 28630647177732763 [+  125]: __mod_timer <-mod_timer
 perl-2497  [00] 28630647177732888 [+  125]: __timer_stats_timer_set_start_info <-__mod_timer
 perl-2497  [00] 28630647177733013 [+   93]: lock_timer_base <-__mod_timer

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Mustafa Mesanovic <mustafa.mesanovic@de.ibm.com>
Cc: Arjan van de Ven <arjan@infradead.org>
LKML-Reference: <20090623153811.GA4641@osiris.boeblingen.de.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoftrace: Fix t_hash_start()
Li Zefan [Wed, 24 Jun 2009 01:54:54 +0000 (09:54 +0800)]
ftrace: Fix t_hash_start()

When the output of set_ftrace_filter is larger than PAGE_SIZE,
t_hash_start() will be called the 2nd time, and then we start
from the head of a hlist, which is wrong and causes some entries
to be outputed twice.

The worse is, if the hlist is large enough, reading set_ftrace_filter
won't stop but in a dead loop.

Reviewed-by: Liming Wang <liming.wang@windriver.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4A41876E.2060407@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoftrace: Don't manipulate @pos in t_start()
Li Zefan [Wed, 24 Jun 2009 01:54:19 +0000 (09:54 +0800)]
ftrace: Don't manipulate @pos in t_start()

It's rather confusing that in t_start(), in some cases @pos is
incremented, and in some cases it's decremented and then incremented.

This patch rewrites t_start() in a much more general way.

Thus we fix a bug that if ftrace_filtered == 1, functions have tracer
hooks won't be printed, because the branch is always unreachable:

static void *t_start(...)
{
...
if (!p)
return t_hash_start(m, pos);
return p;
}

Before:
  # echo 'sys_open' > /mnt/tracing/set_ftrace_filter
  # echo 'sys_write:traceon:4' >> /mnt/tracing/set_ftrace_filter
  sys_open

After:
  # echo 'sys_open' > /mnt/tracing/set_ftrace_filter
  # echo 'sys_write:traceon:4' >> /mnt/tracing/set_ftrace_filter
  sys_open
  sys_write:traceon:count=4

Reviewed-by: Liming Wang <liming.wang@windriver.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4A41874B.4090507@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoftrace: Don't increment @pos in g_start()
Li Zefan [Wed, 24 Jun 2009 01:54:00 +0000 (09:54 +0800)]
ftrace: Don't increment @pos in g_start()

It's wrong to increment @pos in g_start(). It causes some entries
lost when reading set_graph_function, if the output of the file
is larger than PAGE_SIZE.

Reviewed-by: Liming Wang <liming.wang@windriver.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4A418738.7090401@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotracing: Reset iterator in t_start()
Li Zefan [Wed, 24 Jun 2009 01:53:44 +0000 (09:53 +0800)]
tracing: Reset iterator in t_start()

The iterator is m->private, but it's not reset to trace_types in
t_start(). If the output is larger than PAGE_SIZE and t_start()
is called the 2nd time, things will go wrong.

Reviewed-by: Liming Wang <liming.wang@windriver.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4A418728.5020506@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotrace_stat: Don't increment @pos in seq start()
Li Zefan [Wed, 24 Jun 2009 01:53:26 +0000 (09:53 +0800)]
trace_stat: Don't increment @pos in seq start()

It's wrong to increment @pos in stat_seq_start(). It causes some
stat entries lost when reading stat file, if the output of the file
is larger than PAGE_SIZE.

Reviewed-by: Liming Wang <liming.wang@windriver.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4A418716.90209@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotracing_bprintk: Don't increment @pos in t_start()
Li Zefan [Wed, 24 Jun 2009 01:52:58 +0000 (09:52 +0800)]
tracing_bprintk: Don't increment @pos in t_start()

It's wrong to increment @pos in t_start(), otherwise we'll lose
some entries when reading printk_formats, if the output is larger
than PAGE_SIZE.

Reported-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Reviewed-by: Liming Wang <liming.wang@windriver.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4A4186FA.1020106@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotracing/events: Don't increment @pos in s_start()
Li Zefan [Wed, 24 Jun 2009 01:52:29 +0000 (09:52 +0800)]
tracing/events: Don't increment @pos in s_start()

While testing syscall tracepoints posted by Jason, I found 3 entries
were missing when reading available_events. The output size of
available_events is < 4 pages, which means we lost 1 entry per page.

The cause is, it's wrong to increment @pos in s_start().

Actually there's another bug here -- reading avaiable_events/set_events
can race with module unload:

  # cat available_events               |
      s_start()                        |
      s_stop()                         |
                                       | # rmmod foo.ko
      s_start()                        |
        call = list_entry(m->private)  |

@call might be freed and accessing it will lead to crash.

Reviewed-by: Liming Wang <liming.wang@windriver.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4A4186DD.6090405@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoide: improve handling of Power Management requests
Bartlomiej Zolnierkiewicz [Wed, 24 Jun 2009 06:52:17 +0000 (23:52 -0700)]
ide: improve handling of Power Management requests

Make hwif->rq point to PM request during PM sequence and do not allow
any other types of requests to slip in (the old comment was never correct
as there should be no such requests generated during PM sequence).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoide: add QUANTUM FIREBALLct20 30 with firmware APL.090 to ivb_list[]
Bartlomiej Zolnierkiewicz [Tue, 23 Jun 2009 23:11:10 +0000 (16:11 -0700)]
ide: add QUANTUM FIREBALLct20 30 with firmware APL.090 to ivb_list[]

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoide: relax DMA info validity checking
Bartlomiej Zolnierkiewicz [Mon, 22 Jun 2009 07:38:26 +0000 (07:38 +0000)]
ide: relax DMA info validity checking

There are some broken devices that report multiple DMA xfer modes
enabled at once (ATA spec doesn't allow it) but otherwise work fine
with DMA so just delete ide_id_dma_bug().

[ As discovered by detective work by Frans and Bart, due to how
  handling of the ID block was handled before commit c419993
  ("ide-iops: only clear DMA words on setting DMA mode") this
  check was always seeing zeros in the fields or other similar
  garbage.  Therefore this check wasn't actually checking anything.
  Now that the tests actually check the real bits, all we see are
  devices that trigger the check yet work perfectly fine, therefore
  killing this useless check is the best thing to do. -DaveM ]

Reported-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoide-cd: Improve "weird block size" error message
Frans Pop [Tue, 23 Jun 2009 23:02:58 +0000 (16:02 -0700)]
ide-cd: Improve "weird block size" error message

Currently the error gets repeated too frequently, for example each
time HAL polls the device when a disc is present. Avoid that by using
printk_once instead of printk.

Also join the error and corrective action messages into a single line.

Signed-off-by: Frans Pop <elendil@planet.nl>
Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoide-cd: Don't warn on bogus block size unless it actually matters.
David S. Miller [Tue, 23 Jun 2009 23:01:06 +0000 (16:01 -0700)]
ide-cd: Don't warn on bogus block size unless it actually matters.

Frans Pop reported that his CDROM drive reports a blocksize of 2352,
and this causes new warnings due to commit
e8e7b9eb11c34ee18bde8b7011af41938d1ad667 ("ide-cd: fix oops when using
growisofs").

What we're trying to do is make sure that "blocklen >> SECTOR_BITS"
is something the block layer won't choke on.

And for Frans' case "2352 >> SECTOR_BITS" is equal to
"2048 >> SECTOR_BITS", and thats "4".

So warning in this case gives no real benefit.

Reported-by: Frans Pop <elendil@planet.nl>
Tested-by: Frans Pop <elendil@planet.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoide: fix handling of unexpected IRQs vs request_irq()
Bartlomiej Zolnierkiewicz [Tue, 23 Jun 2009 10:43:00 +0000 (03:43 -0700)]
ide: fix handling of unexpected IRQs vs request_irq()

Add ide_host_enable_irqs() helper and use it in ide_host_register()
before registering ports.  Then remove no longer needed IRQ unmasking
from in init_irq().

This should fix the problem with "screaming" shared IRQ on the first
port (after request_irq() call while we have the unexpected IRQ pending
on the second port) which was uncovered by my rework of the serialized
interfaces support.

Reported-by: Frans Pop <elendil@planet.nl>
Tested-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2: Fix the behavior of ethtool when ONBOOT=no
Ooiwa Naohiro [Wed, 24 Jun 2009 07:19:06 +0000 (00:19 -0700)]
bnx2: Fix the behavior of ethtool when ONBOOT=no

I found a little bug.

When configure in ifcfg-eth* is ONBOOT=no,
the behavior of ethtool command is wrong.

    # grep ONBOOT /etc/sysconfig/network-scripts/ifcfg-eth2
    ONBOOT=no
    # ethtool eth2 | tail -n1
            Link detected: yes

I think "Link detected" should be "no".

Signed-off-by: Ooiwa Naohiro <nooiwa@miraclelinux.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrm: remove unused #include <linux/version.h>'s
Huang Weiyi [Wed, 24 Jun 2009 06:31:50 +0000 (16:31 +1000)]
drm: remove unused #include <linux/version.h>'s

Remove unused #include <linux/version.h>('s) in
 drivers/gpu/drm/ttm/ttm_bo_util.c
 drivers/gpu/drm/ttm/ttm_bo_vm.c
 drivers/gpu/drm/ttm/ttm_tt.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoMerge remote branch 'origin/drm-intel-next' of ../drm-intel into drm-fixes
Dave Airlie [Wed, 24 Jun 2009 06:20:19 +0000 (16:20 +1000)]
Merge remote branch 'origin/drm-intel-next' of ../drm-intel into drm-fixes

15 years agodrm/radeon: fix driver initialization order so radeon kms can be builtin
Jerome Glisse [Mon, 22 Jun 2009 16:16:13 +0000 (18:16 +0200)]
drm/radeon: fix driver initialization order so radeon kms can be builtin

TTM need to be initialized before radeon if KMS is enabled otherwise
the kernel will crash hard.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agodrm: Fix shifts which were miscalculated when converting from bitfields.
Michel Dänzer [Tue, 23 Jun 2009 10:36:32 +0000 (12:36 +0200)]
drm: Fix shifts which were miscalculated when converting from bitfields.

Looks like I managed to mess up most shifts when converting from bitfields. :(

The patch below works on my Thinkpad T500 (as well as on my PowerBook,
where the previous change worked as well, maybe out of luck...). I'd
appreciate more testing and eyes looking over it though.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Tested-by: Michael Pyne <mpyne@kde.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agodrm/radeon: Clear surface registers at initialization time.
Michel Dänzer [Tue, 23 Jun 2009 14:12:54 +0000 (16:12 +0200)]
drm/radeon: Clear surface registers at initialization time.

Some PowerMac firmwares set up a tiling surface at the beginning of VRAM
which messes us up otherwise.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agodrm/radeon: Don't initialize acceleration related fields of struct fb_info.
Michel Dänzer [Tue, 23 Jun 2009 14:12:53 +0000 (16:12 +0200)]
drm/radeon: Don't initialize acceleration related fields of struct fb_info.

Might lure userspace into trying silly things otherwise.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agodrm/radeon: fix radeon kms framebuffer device
Jerome Glisse [Mon, 22 Jun 2009 16:15:58 +0000 (18:15 +0200)]
drm/radeon: fix radeon kms framebuffer device

smem.start is a physical address which kernel can remap to access
video memory of the fb buffer. We now pin the fb buffer into vram
by doing so we are loosing vram but fbdev need to be reworked to
allow change in framebuffer address.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>