linux-2.6
15 years agoprevent boosting kprobes on exception address
Masami Hiramatsu [Mon, 16 Mar 2009 22:57:22 +0000 (18:57 -0400)] 
prevent boosting kprobes on exception address

Don't boost at the addresses which are listed on exception tables,
because major page fault will occur on those addresses.  In that case,
kprobes can not ensure that when instruction buffer can be freed since
some processes will sleep on the buffer.

kprobes-ia64 already has same check.

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm
Linus Torvalds [Tue, 17 Mar 2009 15:59:33 +0000 (08:59 -0700)] 
Merge git://git./linux/kernel/git/agk/linux-2.6-dm

* git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm:
  dm crypt: wait for endio to complete before destruction
  dm crypt: fix kcryptd_async_done parameter
  dm io: respect BIO_MAX_PAGES limit
  dm table: rework reference counting fix
  dm ioctl: validate name length when renaming

15 years agopowerpc/mm: Respect _PAGE_COHERENT on classic ppc32 SW
Kumar Gala [Tue, 17 Mar 2009 15:17:50 +0000 (09:17 -0600)] 
powerpc/mm: Respect _PAGE_COHERENT on classic ppc32 SW

Since we now set _PAGE_COHERENT in the Linux PTE we shouldn't be clearing
it out before we setup the SW TLB.  Today all the SW TLB machines
(603/e300) that we support are non-SMP, however there are some errata on
some devices that cause us to set _PAGE_COHERENT via CPU_FTR_NEED_COHERENT.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years agopowerpc/5200: Enable CPU_FTR_NEED_COHERENT for MPC52xx
Piotr Ziecik [Tue, 17 Mar 2009 15:17:50 +0000 (09:17 -0600)] 
powerpc/5200: Enable CPU_FTR_NEED_COHERENT for MPC52xx

BestComm, a DMA engine in MPC52xx SoC, requires snooping when
CPU caches are enabled to work properly.

Adding CPU_FTR_NEED_COHERENT fixes NFS problems on MPC52xx machines
introduced by 'powerpc/mm: Fix handling of _PAGE_COHERENT in BAT setup
code' (sha1: 4c456a67f501b8b15542c7c21c28812bf88f484b).

Signed-off-by: Piotr Ziecik <kosmo@semihalf.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years agoFast TSC calibration: calculate proper frequency error bounds
Linus Torvalds [Tue, 17 Mar 2009 15:13:17 +0000 (08:13 -0700)] 
Fast TSC calibration: calculate proper frequency error bounds

In order for ntpd to correctly synchronize the clocks, the frequency of
the system clock must not be off by more than 500 ppm (or, put another
way, 1:2000), or ntpd will end up giving up on trying to synchronize
properly, and ends up reseting the clock in jumps instead.

The fast TSC PIT calibration sometimes failed this test - it was
assuming that the PIT reads always took about one microsecond each (2us
for the two reads to get a 16-bit timer), and that calibrating TSC to
the PIT over 15ms should thus be sufficient to get much closer than
500ppm (max 2us error on both sides giving 4us over 15ms: a 270 ppm
error value).

However, that assumption does not always hold: apparently some hardware
is either very much slower at reading the PIT registers, or there was
other noise causing at least one machine to get 700+ ppm errors.

So instead of using a fixed 15ms timing loop, this changes the fast PIT
calibration to read the TSC delta over the individual PIT timer reads,
and use the result to calculate the error bars on the PIT read timing
properly.  We then successfully calibrate the TSC only if the maximum
error bars fall below 500ppm.

In the process, we also relax the timing to allow up to 25ms for the
calibration, although it can happen much faster depending on hardware.

Reported-and-tested-by: Jesper Krogh <jesper@krogh.cc>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFix potential fast PIT TSC calibration startup glitch
Linus Torvalds [Tue, 17 Mar 2009 14:58:26 +0000 (07:58 -0700)] 
Fix potential fast PIT TSC calibration startup glitch

During bootup, when we reprogram the PIT (programmable interval timer)
to start counting down from 0xffff in order to use it for the fast TSC
calibration, we should also make sure to delay a bit afterwards to allow
the PIT hardware to actually start counting with the new value.

That will happens at the next CLK pulse (1.193182 MHz), so the easiest
way to do that is to just wait at least one microsecond after
programming the new PIT counter value.  We do that by just reading the
counter value back once - which will take about 2us on PC hardware.

Reported-and-tested-by: john stultz <johnstul@us.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoALSA: opl3sa2 - Fix NULL dereference when suspending snd_opl3sa2
Krzysztof Helt [Mon, 16 Mar 2009 20:32:25 +0000 (21:32 +0100)] 
ALSA: opl3sa2 - Fix NULL dereference when suspending snd_opl3sa2

Fix the OOPS during a opl3sa2 card suspend
and resume if the driver is loaded but the card
is not found.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoext4: fix bb_prealloc_list corruption due to wrong group locking
Eric Sandeen [Tue, 17 Mar 2009 03:25:40 +0000 (23:25 -0400)] 
ext4: fix bb_prealloc_list corruption due to wrong group locking

This is for Red Hat bug 490026: EXT4 panic, list corruption in
ext4_mb_new_inode_pa

ext4_lock_group(sb, group) is supposed to protect this list for
each group, and a common code flow to remove an album is like
this:

    ext4_get_group_no_and_offset(sb, pa->pa_pstart, &grp, NULL);
    ext4_lock_group(sb, grp);
    list_del(&pa->pa_group_list);
    ext4_unlock_group(sb, grp);

so it's critical that we get the right group number back for
this prealloc context, to lock the right group (the one
associated with this pa) and prevent concurrent list manipulation.

however, ext4_mb_put_pa() passes in (pa->pa_pstart - 1) with a
comment, "-1 is to protect from crossing allocation group".

This makes sense for the group_pa, where pa_pstart is advanced
by the length which has been used (in ext4_mb_release_context()),
and when the entire length has been used, pa_pstart has been
advanced to the first block of the next group.

However, for inode_pa, pa_pstart is never advanced; it's just
set once to the first block in the group and not moved after
that.  So in this case, if we subtract one in ext4_mb_put_pa(),
we are actually locking the *previous* group, and opening the
race with the other threads which do not subtract off the extra
block.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agom68k: merge the non-MMU and MMU versions of siginfo.h
Greg Ungerer [Mon, 16 Mar 2009 22:47:11 +0000 (08:47 +1000)] 
m68k: merge the non-MMU and MMU versions of siginfo.h

It is trivial to merge the non-MMU and MMU versions of siginfo.h.
Without a single file "make headers_install" is broken for m68k
(since each of the sub-varients of siginfo.h are not installed).

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
15 years agom68k: use the MMU version of unistd.h for all m68k platforms
Greg Ungerer [Mon, 16 Mar 2009 12:12:28 +0000 (22:12 +1000)] 
m68k: use the MMU version of unistd.h for all m68k platforms

The MMU version of unistd.h can be use on non-MMU platrorms as well.
Without a single file "make headers_install" is broken for m68k
(since each of the sub-varients of unistd.h are not installed).

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
15 years agom68k: merge the non-MMU and MMU versions of signal.h
Greg Ungerer [Mon, 16 Mar 2009 12:10:08 +0000 (22:10 +1000)] 
m68k: merge the non-MMU and MMU versions of signal.h

It is trivial to merge the non-MMU and MMU versions of signal.h.
Without a single file "make headers_install" is broken for m68k
(since each of the sub-varients of signal.h are not installed).

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
15 years agom68k: merge the non-MMU and MMU versions of ptrace.h
Greg Ungerer [Mon, 16 Mar 2009 12:07:39 +0000 (22:07 +1000)] 
m68k: merge the non-MMU and MMU versions of ptrace.h

It is trivial to merge the non-MMU and MMU versions of ptrace.h.
Without a single file "make headers_install" is broken for m68k
(since each of the sub-varients of ptrace.h are not installed).

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
15 years agom68k: use MMU version of setup.h for both MMU and non-MMU
Greg Ungerer [Mon, 16 Mar 2009 12:03:25 +0000 (22:03 +1000)] 
m68k: use MMU version of setup.h for both MMU and non-MMU

The MMU version of setup.h can be used for all m68k platforms.
Without a single file "make headers_install" is broken for m68k
(since each of the sub-varients of setup.h are not installed).

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
15 years agozd1211rw: Do not panic on device eject when associated
Jouni Malinen [Mon, 16 Mar 2009 19:47:33 +0000 (21:47 +0200)] 
zd1211rw: Do not panic on device eject when associated

zd_op_tx() must not return an arbitrary error value since that can
leave mac80211 trying to retransmit the frame and with the extra data
pushed into the beginning of the skb on every attempt, this will end up
causing a kernel panic (skb_under_panic from skb_push call). This can
happen, e.g., when ejecting the device when associated.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Fix panic on fragmentation with power saving
Jouni Malinen [Fri, 13 Mar 2009 11:59:39 +0000 (13:59 +0200)] 
mac80211: Fix panic on fragmentation with power saving

It was possible to hit a kernel panic on NULL pointer dereference in
dev_queue_xmit() when sending power save buffered frames to a STA that
woke up from sleep. This happened when the buffered frame was requeued
for transmission in ap_sta_ps_end(). In order to avoid the panic, copy
the skb->dev and skb->iif values from the first fragment to all other
fragments.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: AR9280 PCI devices must serialize IO as well
Luis R. Rodriguez [Thu, 12 Mar 2009 22:18:50 +0000 (18:18 -0400)] 
ath9k: AR9280 PCI devices must serialize IO as well

Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: implement IO serialization
Luis R. Rodriguez [Thu, 12 Mar 2009 22:18:49 +0000 (18:18 -0400)] 
ath9k: implement IO serialization

All 802.11n PCI devices (Cardbus, PCI, mini-PCI) require
serialization of IO when on non-uniprocessor systems. PCI
express devices not not require this.

This should fix our only last standing open ath9k kernel.org
bugzilla bug report:

http://bugzilla.kernel.org/show_bug.cgi?id=12110

A port is probably required to older kernels and I can work on
that.

Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agolib80211: silence excessive crypto debugging messages
John W. Linville [Wed, 11 Mar 2009 15:05:25 +0000 (11:05 -0400)] 
lib80211: silence excessive crypto debugging messages

When they were part of the now defunct ieee80211 component, these
messages were only visible when special debugging settings were enabled.
Let's mirror that with a new lib80211 debugging Kconfig option.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Mon, 16 Mar 2009 19:49:12 +0000 (12:49 -0700)] 
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  acpi-wmi: unsigned cannot be less than 0
  thinkpad-acpi: fix module autoloading for older models
  acer-wmi: Unmark as 'experimental'
  acpi-wmi: Unmark as 'experimental'
  acer-wmi: double free in acer_rfkill_exit()
  platform/x86: depends instead of select for laptop platform drivers
  asus-laptop: use select instead of depends on
  eeepc-laptop: restore acpi_generate_proc_event()
  asus-laptop: restore acpi_generate_proc_event()
  acpi: check for pxm_to_node_map overflow
  ACPI: remove doubled status checking
  ACPI suspend: Blacklist Toshiba Satellite L300 that requires to set SCI_EN directly on resume
  Revert "ACPI: make some IO ports off-limits to AML"
  suspend: switch the Asus Pundit P1-AH2 to old ACPI sleep ordering

15 years agodm crypt: wait for endio to complete before destruction
Milan Broz [Mon, 16 Mar 2009 17:44:36 +0000 (17:44 +0000)] 
dm crypt: wait for endio to complete before destruction

The following oops has been reported when dm-crypt runs over a loop device.

...
[   70.381058] Process loop0 (pid: 4268, ti=cf3b2000 task=cf1cc1f0 task.ti=cf3b2000)
...
[   70.381058] Call Trace:
[   70.381058]  [<d0d76601>] ? crypt_dec_pending+0x5e/0x62 [dm_crypt]
[   70.381058]  [<d0d767b8>] ? crypt_endio+0xa2/0xaa [dm_crypt]
[   70.381058]  [<d0d76716>] ? crypt_endio+0x0/0xaa [dm_crypt]
[   70.381058]  [<c01a2f24>] ? bio_endio+0x2b/0x2e
[   70.381058]  [<d0806530>] ? dec_pending+0x224/0x23b [dm_mod]
[   70.381058]  [<d08066e4>] ? clone_endio+0x79/0xa4 [dm_mod]
[   70.381058]  [<d080666b>] ? clone_endio+0x0/0xa4 [dm_mod]
[   70.381058]  [<c01a2f24>] ? bio_endio+0x2b/0x2e
[   70.381058]  [<c02bad86>] ? loop_thread+0x380/0x3b7
[   70.381058]  [<c02ba8a1>] ? do_lo_send_aops+0x0/0x165
[   70.381058]  [<c013754f>] ? autoremove_wake_function+0x0/0x33
[   70.381058]  [<c02baa06>] ? loop_thread+0x0/0x3b7

When a table is being replaced, it waits for I/O to complete
before destroying the mempool, but the endio function doesn't
call mempool_free() until after completing the bio.

Fix it by swapping the order of those two operations.

The same problem occurs in dm.c with md referenced after dec_pending.
Again, we swap the order.

Cc: stable@kernel.org
Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
15 years agodm crypt: fix kcryptd_async_done parameter
Huang Ying [Mon, 16 Mar 2009 17:44:33 +0000 (17:44 +0000)] 
dm crypt: fix kcryptd_async_done parameter

In the async encryption-complete function (kcryptd_async_done), the
crypto_async_request passed in may be different from the one passed to
crypto_ablkcipher_encrypt/decrypt.  Only crypto_async_request->data is
guaranteed to be same as the one passed in.  The current
kcryptd_async_done uses the passed-in crypto_async_request directly
which may cause the AES-NI-based AES algorithm implementation to panic.

This patch fixes this bug by only using crypto_async_request->data,
which points to dm_crypt_request, the crypto_async_request passed in.
The original data (convert_context) is gotten from dm_crypt_request.

[mbroz@redhat.com: reworked]
Cc: stable@kernel.org
Signed-off-by: Huang Ying <ying.huang@intel.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
15 years agodm io: respect BIO_MAX_PAGES limit
Mikulas Patocka [Mon, 16 Mar 2009 17:44:30 +0000 (17:44 +0000)] 
dm io: respect BIO_MAX_PAGES limit

dm-io calls bio_get_nr_vecs to get the maximum number of pages to use
for a given device.  It allocates one additional bio_vec to use
internally but failed to respect BIO_MAX_PAGES, so fix this.

This was the likely cause of:
  https://bugzilla.redhat.com/show_bug.cgi?id=173153

Cc: stable@kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
15 years agodm table: rework reference counting fix
Mikulas Patocka [Mon, 16 Mar 2009 17:44:26 +0000 (17:44 +0000)] 
dm table: rework reference counting fix

Fix an error introduced in dm-table-rework-reference-counting.patch.

When there is failure after table initialization, we need to use
dm_table_destroy, not dm_table_put, to free the table.

dm_table_put may be used only after dm_table_get.

Cc: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reviewed-by: Jonathan Brassow <jbrassow@redhat.com>
Reviewed-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
15 years agodm ioctl: validate name length when renaming
Milan Broz [Mon, 16 Mar 2009 16:56:01 +0000 (16:56 +0000)] 
dm ioctl: validate name length when renaming

When renaming a mapped device validate the length of the new name.

The rename ioctl accepted any correctly-terminated string enclosed
within the data passed from userspace.  The other ioctls enforce a
size limit of DM_NAME_LEN.  If the name is changed and becomes longer
than that, the device can no longer be addressed by name.

Fix it by properly checking for device name length (including
terminating zero).

Cc: stable@kernel.org
Signed-off-by: Milan Broz <mbroz@redhat.com>
Reviewed-by: Jonathan Brassow <jbrassow@redhat.com>
Reviewed-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 16 Mar 2009 14:56:58 +0000 (07:56 -0700)] 
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (21 commits)
  r8169: revert "r8169: read MAC address from EEPROM on init (2nd attempt)"
  r8169: use hardware auto-padding.
  igb: remove ASPM L0s workaround
  netxen: remove old flash check.
  mv643xx_eth: fix unicast address filter corruption on mtu change
  xfrm: Fix xfrm_state_find() wrt. wildcard source address.
  emac: Fix clock control for 405EX and 405EXr chips
  ixgbe: fix multiple unicast address support
  via-velocity: Fix DMA mapping length errors on transmit.
  qlge: bugfix: Pad outbound frames smaller than 60 bytes.
  qlge: bugfix: Move netif_napi_del() to common call point.
  qlge: bugfix: Tell hw to strip vlan header.
  qlge: bugfix: Increase filter on inbound csum.
  dnet: replace obsolete *netif_rx_* functions with *napi_*
  net: Add be2net driver.
  dnet: Fix warnings on 64-bit.
  dnet: Dave DNET ethernet controller driver (updated)
  ipv6:  Fix BUG when disabled ipv6 module is unloaded
  bnx2x: Using DMAE to initialize the chip
  bnx2x: Casting page alignment
  ...

15 years agolinux.conf.au 2009: Tuz
Rusty Russell [Sun, 15 Mar 2009 22:35:07 +0000 (09:05 +1030)] 
linux.conf.au 2009: Tuz

Impact: help prevent extinction of species

The Tasmanian Devil is a shy iconic Australian creature named for its
spine-chilling screech.  It is threatened with extinction due to a
scientifically interesting but horrific transmissible facial cancer.

This one is standing in for Tux for one release using the far less-known
Devil Facial Tux Disguise.

Save The Tasmanian Devil http://tassiedevil.com.au

Signed-off-by: Linux.conf.au Hobart Team <contact@marchsouth.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agonetfilter: conntrack: check for NEXTHDR_NONE before header sanity checking
Christoph Paasch [Mon, 16 Mar 2009 14:52:11 +0000 (15:52 +0100)] 
netfilter: conntrack: check for NEXTHDR_NONE before header sanity checking

NEXTHDR_NONE doesn't has an IPv6 option header, so the first check
for the length will always fail and results in a confusing message
"too short" if debugging enabled. With this patch, we check for
NEXTHDR_NONE before length sanity checkings are done.

Signed-off-by: Christoph Paasch <christoph.paasch@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
15 years agofilp->f_pos not correctly updated in proc_task_readdir
Zhang Le [Mon, 16 Mar 2009 06:44:31 +0000 (14:44 +0800)] 
filp->f_pos not correctly updated in proc_task_readdir

filp->f_pos only get updated at the end of the function. Thus d_off of those
dirents who are in the middle will be 0, and this will cause a problem in
glibc's readdir implementation, specifically endless loop. Because when overflow
occurs, f_pos will be set to next dirent to read, however it will be 0, unless
the next one is the last one. So it will start over again and again.

There is a sample program in man 2 gendents. This is the output of the program
running on a multithread program's task dir before this patch is applied:

  $ ./a.out /proc/3807/task
  --------------- nread=128 ---------------
  i-node#  file type  d_reclen  d_off   d_name
    506442  directory    16          1  .
    506441  directory    16          0  ..
    506443  directory    16          0  3807
    506444  directory    16          0  3809
    506445  directory    16          0  3812
    506446  directory    16          0  3861
    506447  directory    16          0  3862
    506448  directory    16          8  3863

This is the output after this patch is applied

  $ ./a.out /proc/3807/task
  --------------- nread=128 ---------------
  i-node#  file type  d_reclen  d_off   d_name
    506442  directory    16          1  .
    506441  directory    16          2  ..
    506443  directory    16          3  3807
    506444  directory    16          4  3809
    506445  directory    16          5  3812
    506446  directory    16          6  3861
    506447  directory    16          7  3862
    506448  directory    16          8  3863

Signed-off-by: Zhang Le <r0bertz@gentoo.org>
Acked-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agonetfilter: conntrack: fix dropping packet after l4proto->packet()
Christoph Paasch [Mon, 16 Mar 2009 14:51:29 +0000 (15:51 +0100)] 
netfilter: conntrack: fix dropping packet after l4proto->packet()

We currently use the negative value in the conntrack code to encode
the packet verdict in the error. As NF_DROP is equal to 0, inverting
NF_DROP makes no sense and, as a result, no packets are ever dropped.

Signed-off-by: Christoph Paasch <christoph.paasch@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
15 years agonetfilter: ctnetlink: fix crash during expectation creation
Pablo Neira Ayuso [Mon, 16 Mar 2009 14:50:51 +0000 (15:50 +0100)] 
netfilter: ctnetlink: fix crash during expectation creation

This patch fixes a possible crash due to the missing initialization
of the expectation class when nf_ct_expect_related() is called.

Reported-by: BORBELY Zoltan <bozo@andrews.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
15 years agonetfilter: conntrack: don't deliver events for racy packets
Pablo Neira Ayuso [Mon, 16 Mar 2009 14:06:42 +0000 (15:06 +0100)] 
netfilter: conntrack: don't deliver events for racy packets

This patch skips the delivery of conntrack events if the packet
was drop due to a race condition in the conntrack insertion.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
15 years agom68k: merge the non-MMU and MMU versions of sigcontext.h
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>
15 years agom68k: merge the non-MMU and MMU versions of swab.h
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>
15 years agom68k: merge the non-MMU and MMU versions of param.h
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>
15 years agoMerge branches 'misc-up-now' and 'platform-drivers' into release
Len Brown [Mon, 16 Mar 2009 04:38:52 +0000 (00:38 -0400)] 
Merge branches 'misc-up-now' and 'platform-drivers' into release

15 years agoacpi-wmi: unsigned cannot be less than 0
Roel Kluin [Wed, 4 Mar 2009 19:55:30 +0000 (11:55 -0800)] 
acpi-wmi: unsigned cannot be less than 0

include/linux/pci-acpi.h:74:

typedef u32                 acpi_status;

result is unsigned, so an error returned by acpi_bus_register_driver()
will not be noticed.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agothinkpad-acpi: fix module autoloading for older models
Mathieu Chouquet-Stringer [Sat, 14 Mar 2009 15:35:26 +0000 (16:35 +0100)] 
thinkpad-acpi: fix module autoloading for older models

Looking at the source, there seems to be a missing * to match my DMI
string.  I mean for newer IBM and Lenovo's laptops you match either one
of the following:
MODULE_ALIAS("dmi:bvnIBM:*:svnIBM:*:pvrThinkPad*:rvnIBM:*");
MODULE_ALIAS("dmi:bvnLENOVO:*:svnLENOVO:*:pvrThinkPad*:rvnLENOVO:*");

While for older Thinkpads, you do this (for instance):
IBM_BIOS_MODULE_ALIAS("1[0,3,6,8,A-G,I,K,M-P,S,T]");

with IBM_BIOS_MODULE_ALIAS being MODULE_ALIAS("dmi:bvnIBM:bvr" __type "ET??WW")

Note there's no * terminating the string.  As result, udev doesn't load
anything because modprobe cannot find anything matching this (my
machine actually):

udevtest: run: '/sbin/modprobe dmi:bvnIBM:bvr1IET71WW(2.10):bd06/16/2006:svnIBM:pn236621U:pvrNotAv

Signed-off-by: Mathieu Chouquet-Stringer <mchouque@free.fr>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoacer-wmi: Unmark as 'experimental'
Carlos Corbacho [Sat, 14 Feb 2009 09:53:59 +0000 (09:53 +0000)] 
acer-wmi: Unmark as 'experimental'

This driver has been around and used long enough that we can drop the
'experimental'.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoacpi-wmi: Unmark as 'experimental'
Carlos Corbacho [Sat, 14 Feb 2009 09:53:53 +0000 (09:53 +0000)] 
acpi-wmi: Unmark as 'experimental'

ACPI-WMI isn't experimental anymore, and there are other drivers that now
depend on it that aren't either.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoacer-wmi: double free in acer_rfkill_exit()
Dan Carpenter [Sat, 14 Feb 2009 09:53:48 +0000 (09:53 +0000)] 
acer-wmi: double free in acer_rfkill_exit()

This is acer_rfkill_exit() from drivers/platform/x86/acer-wmi.c.

The code frees wireless_rfkill->data again instead of
bluetooth_rfkill->data.

This was found using a code checker (http://repo.or.cz/w/smatch.git/).

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoplatform/x86: depends instead of select for laptop platform drivers
Corentin Chary [Wed, 25 Feb 2009 08:37:09 +0000 (09:37 +0100)] 
platform/x86: depends instead of select for laptop platform drivers

"I hate `select' and will gleefully leap on any s/select/depends/ patch,
whether it works or not :)"
  Andrew Morton

select INPUT is not needed here, because if someone doesn't want INPUT,
he won't want these drivers either.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoasus-laptop: use select instead of depends on
Corentin Chary [Sun, 15 Feb 2009 18:30:21 +0000 (19:30 +0100)] 
asus-laptop: use select instead of depends on

Like thinkpad_acpi or eeepc-laptop, asus-laptop will
now use "select" instead of "depends on"
for LEDS_CLASS, NEW_LEDS and BACKLIGHT_CLASS_DEVICE

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoeeepc-laptop: restore acpi_generate_proc_event()
Corentin Chary [Sun, 15 Feb 2009 18:30:20 +0000 (19:30 +0100)] 
eeepc-laptop: restore acpi_generate_proc_event()

Restore acpi_generate_proc_event() for backward
compatibility with old acpi scripts.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoasus-laptop: restore acpi_generate_proc_event()
Corentin Chary [Sun, 15 Feb 2009 18:30:19 +0000 (19:30 +0100)] 
asus-laptop: restore acpi_generate_proc_event()

Restore acpi_generate_proc_event() for backward
compatibility with old acpi scripts.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoacpi: check for pxm_to_node_map overflow
Cyrill Gorcunov [Wed, 4 Mar 2009 19:55:29 +0000 (11:55 -0800)] 
acpi: check for pxm_to_node_map overflow

It is hardly (if ever) possible but in case of broken _PXM entry we could
reach out of pxm_to_node_map array bounds in acpi_map_pxm_to_node() call.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPI: remove doubled status checking
Jiri Slaby [Wed, 4 Mar 2009 19:55:27 +0000 (11:55 -0800)] 
ACPI: remove doubled status checking

There was a misplaced status test (two consequent tests without a
statement in between) in acpi_bus_init for ages.  Remove it, since the
function which should be checked (acpi_os_initialize1) has BUG_ONs on
failure paths.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPI suspend: Blacklist Toshiba Satellite L300 that requires to set SCI_EN directly...
Zhang Rui [Mon, 16 Mar 2009 02:13:44 +0000 (22:13 -0400)] 
ACPI suspend: Blacklist Toshiba Satellite L300 that requires to set SCI_EN directly on resume

This is a supplement of commit 65df78473ffbf3bff5e2034df1638acc4f3ddd50.
http://bugzilla.kernel.org/show_bug.cgi?id=12798

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoRevert "ACPI: make some IO ports off-limits to AML"
Len Brown [Wed, 25 Feb 2009 23:00:18 +0000 (18:00 -0500)] 
Revert "ACPI: make some IO ports off-limits to AML"

This reverts commit 5ec5d38a1c8af255ffc481c81eef13e9155524b3.
because it caused spurious dmesg warmings.
We'll implement the check for off-limit ports
in a more clever way in the future.

http://bugzilla.kernel.org/show_bug.cgi?id=12758

Signed-off-by: Len Brown <len.brown@intel.com>
15 years agosuspend: switch the Asus Pundit P1-AH2 to old ACPI sleep ordering
Andy Whitcroft [Wed, 11 Feb 2009 18:11:22 +0000 (18:11 +0000)] 
suspend: switch the Asus Pundit P1-AH2 to old ACPI sleep ordering

Switch the Asus Pundit P1-AH2 (M2N8L motherboard) to the old ACPI 1.0
sleep ordering by default.  Without this it will not suspend/resume
correctly.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Tested-by: Dustin Kirkland <kirkland@canonical.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agor8169: revert "r8169: read MAC address from EEPROM on init (2nd attempt)"
françois romieu [Sun, 15 Mar 2009 01:10:50 +0000 (01:10 +0000)] 
r8169: revert "r8169: read MAC address from EEPROM on init (2nd attempt)"

It fails on the following systems:
- RTL8169sc/8110sc (XID 18000000)
  reported by Tim Durack <tdurack@gmail.com> (x86)
- RTL8169sb/8110sb (XID 10000000)
  reported by Mikael Pettersson <mikpe@it.uu.se> (ARM)

The patch appeared to work on x86 for the following systems:
RTL8169sb/8110sb 10000000 PCI   (EXT)
RTL8110s         04000000 PCI   (EXT)
RTL8102e         24a00000 PCI-E (LOM)
RTL8168c/8111c   3c2000c0 PCI-E (LOM)
RTL8168b/8111b   38000000 PCI-E (LOM)
RTL8168b/8111b   38000000 PCI-E (EXT)

The patch exposes two problems:
1) while not completely wrong, mac addresses are not read correctly
   from the EEPROM
2) the MAC address registers are not correctly set

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Tested-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agor8169: use hardware auto-padding.
françois romieu [Sun, 15 Mar 2009 01:09:54 +0000 (01:09 +0000)] 
r8169: use hardware auto-padding.

It shortens the code and fixes the current pci_unmap leak with
padded skb reported by Dave Jones.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agokconfig: improve seed in randconfig
Ingo Molnar [Thu, 12 Mar 2009 14:15:31 +0000 (15:15 +0100)] 
kconfig: improve seed in randconfig

'make randconfig' uses glibc's rand function, and the seed of
that PRNG is set via:

srand(time(NULL));

But 'time()' only increases once every second - freezing the
randconfig result within a single second.

My Nehalem testbox does randconfig much faster than 1 second
 and i have a few scripts that do 'randconfig until condition X'
loops.

Those scripts currently waste a lot of CPU time due to randconfig
changing its seed only once per second currently.

Change the seed to be micrseconds based. (I checked the statistical
spread of the seed - the now.tv_sec*now.tv_usec multiplication
there further improves it.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Roman Zippel <zippel@linux-m68k.org>
[sam: fix for systems where usec is zero - noticed by Geert Uytterhoeven]
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agokconfig: fix randconfig for choice blocks
Sam Ravnborg [Sun, 15 Mar 2009 10:05:12 +0000 (11:05 +0100)] 
kconfig: fix randconfig for choice blocks

Ingo Molnar reported that 'make randconfig' was not covering
choice blocks properly, resulting in certain config options
being left out of randconfig testing altogether.

With the following patch we:
- properly randomize choice value for normal choice blocks
- properly randomize for multi choice blocks
- added several comments to explain what is going on

The root cause of the bug was that SYMBOL_VALID was set on the
symbol representing the choice block so clearing this did
the trick initially.
But testign revealed a few more issues that is now fixed.

Reported-by: Ingo Molnar <mingo@elte.hu>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agoparisc: sba_iommu: fix build bug when CONFIG_PARISC_AGP=y
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>
15 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
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
  ...

15 years agoigb: remove ASPM L0s workaround
Alexander Duyck [Sun, 15 Mar 2009 05:26:40 +0000 (22:26 -0700)] 
igb: remove ASPM L0s workaround

The L0s workaround should be moved into a pci quirk and so it is not
necessary in the driver.  This update removes the L0s workaround from the
igb driver.

This was the second half of the PCI quirk patch that Matthew Wilcox did
not pick up when he picked up the quirk patch.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
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()

15 years agoFix Xilinx SystemACE driver to handle empty CF slot
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>
15 years agoblock: fix memory leak in bio_clone()
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>
15 years agoblock: Add gfp_mask parameter to bio_integrity_clone()
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>
15 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
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

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
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()
  ...

15 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
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

15 years agoMerge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
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()

15 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
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

15 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
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.

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6.29
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

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
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

15 years agovmscan: pgmoved should be cleared after updating recent_rotated
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>
15 years agoeCryptfs: don't encrypt file key with filename key
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>
15 years agonommu: ramfs: don't leak pages when adding to page cache fails
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>
15 years agonommu: ramfs: pages allocated to an inode's pagecache may get wrongly discarded
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>
15 years agonetxen: remove old flash check.
Dhananjay Phadke [Fri, 6 Mar 2009 14:52:12 +0000 (14:52 +0000)] 
netxen: remove old flash check.

Remove flash size check which made sense only for ancient
boards with 1MB flash. The check is based on values read
from specific locations and fails with firmware size changes.

This prevents driver from getting right mac addresses.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoext4: fix bogus BUG_ONs in in mballoc code
Eric Sandeen [Sat, 14 Mar 2009 15:51:46 +0000 (11:51 -0400)] 
ext4: fix bogus BUG_ONs in in mballoc code

Thiemo Nagel reported that:

# dd if=/dev/zero of=image.ext4 bs=1M count=2
# mkfs.ext4 -v -F -b 1024 -m 0 -g 512 -G 4 -I 128 -N 1 \
  -O large_file,dir_index,flex_bg,extent,sparse_super image.ext4
# mount -o loop image.ext4 mnt/
# dd if=/dev/zero of=mnt/file

oopsed, with a BUG_ON in ext4_mb_normalize_request because
size == EXT4_BLOCKS_PER_GROUP

It appears to me (esp. after talking to Andreas) that the BUG_ON
is bogus; a request of exactly EXT4_BLOCKS_PER_GROUP should
be allowed, though larger sizes do indicate a problem.

Fix that an another (apparently rare) codepath with a similar check.

Reported-by: Thiemo Nagel <thiemo.nagel@ph.tum.de>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agomv643xx_eth: fix unicast address filter corruption on mtu change
Lennert Buytenhek [Fri, 13 Mar 2009 22:48:02 +0000 (15:48 -0700)] 
mv643xx_eth: fix unicast address filter corruption on mtu change

When mv643xx_eth_open() is called to up an interface, port_start()
will first re-program the unicast address filter, and then
re-initialise the PORT_CONFIG register, but that will disable unicast
promiscuous mode if it was enabled by the unicast address filter setup.

This isn't a problem on ifconfig up, as ->set_rx_mode() will be called
shortly afterwards which will program the filters again, but it does
trigger when changing the MTU, which calls mv643xx_eth_stop() and then
mv643xx_eth_open() by hand to repopulate the receive rings with skbuffs
of the new size.

Swap the initialisation of the PORT_START register and the call to
the unicast filter setup function to fix this.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMIPS: Mark Eins: Fix configuration.
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>
15 years agoMIPS: Fix TIF_32BIT undefined problem when seccomp is disabled
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>
15 years agosbus: Auto-load openprom module when device opened.
Scott James Remnant [Fri, 13 Mar 2009 21:30:08 +0000 (14:30 -0700)] 
sbus: Auto-load openprom module when device opened.

The openprom module is missing the char-major-10-139 alias that would
cause it to be auto-loaded when a device of that type is opened.  This
patch adds the alias.

Signed-off-by: Scott James Remnant <scott@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoxfrm: Fix xfrm_state_find() wrt. wildcard source address.
David S. Miller [Fri, 13 Mar 2009 21:22:40 +0000 (14:22 -0700)] 
xfrm: Fix xfrm_state_find() wrt. wildcard source address.

The change to make xfrm_state objects hash on source address
broke the case where such source addresses are wildcarded.

Fix this by doing a two phase lookup, first with fully specified
source address, next using saddr wildcarded.

Reported-by: Nicolas Dichtel <nicolas.dichtel@dev.6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoemac: Fix clock control for 405EX and 405EXr chips
Benjamin Herrenschmidt [Fri, 13 Mar 2009 20:48:46 +0000 (13:48 -0700)] 
emac: Fix clock control for 405EX and 405EXr chips

The EMAC variant in the 405EX and 405EXr chips needs the "440EP" type clock
control workaround to avoid lockups of the Rx side during reset.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Tested-by: Felix Radensky <felix@embedded-sol.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoixgbe: fix multiple unicast address support
Chris Leech [Tue, 10 Mar 2009 16:00:24 +0000 (16:00 +0000)] 
ixgbe: fix multiple unicast address support

Multiple unicast address support appears to have been broken with the
change to support net_device_ops.  This a regression from 2.6.28 to 2.6.29.

I'm not 100% on whether ndo_set_multicast_list can be NULL after this
or not.  If ndo_set_rx_mode is set everything _should_ be using it.

Signed-off-by: Chris Leech <christopher.leech@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agovia-velocity: Fix DMA mapping length errors on transmit.
Dave Jones [Fri, 13 Mar 2009 20:37:46 +0000 (13:37 -0700)] 
via-velocity: Fix DMA mapping length errors on transmit.

From: Dave Jones <davej@redhat.com>

The dma-debug changes caught that this driver uses the
wrong DMA mapping length when skb_padto() does something.

With suggestions from Eric Dumazet.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoide: save the returned value of dma_map_sg
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>
15 years agoide-floppy: do not map dataless cmds to an sg
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>
15 years agoata_piix: add workaround for Samsung DB-P70
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>
15 years agolibata: Keep shadow last_ctl up to date during resets
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>
15 years agosata_mv: fix MSI irq race condition
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>
15 years agoqlge: bugfix: Pad outbound frames smaller than 60 bytes.
Ron Mercer [Wed, 11 Mar 2009 11:55:43 +0000 (11:55 +0000)] 
qlge: bugfix: Pad outbound frames smaller than 60 bytes.

With some asic configurations xmit of frames smaller than 60 bytes may
fail.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqlge: bugfix: Move netif_napi_del() to common call point.
Ron Mercer [Wed, 11 Mar 2009 11:55:42 +0000 (11:55 +0000)] 
qlge: bugfix: Move netif_napi_del() to common call point.

Moving netif_napi_del() up the call chain so it will get called from all
exit points.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqlge: bugfix: Tell hw to strip vlan header.
Ron Mercer [Wed, 11 Mar 2009 11:55:41 +0000 (11:55 +0000)] 
qlge: bugfix: Tell hw to strip vlan header.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqlge: bugfix: Increase filter on inbound csum.
Ron Mercer [Wed, 11 Mar 2009 11:55:40 +0000 (11:55 +0000)] 
qlge: bugfix: Increase filter on inbound csum.

Chip does not do UDP checksum when fragmentation occurs.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodnet: replace obsolete *netif_rx_* functions with *napi_*
Ilya Yanok [Fri, 13 Mar 2009 16:51:46 +0000 (09:51 -0700)] 
dnet: replace obsolete *netif_rx_* functions with *napi_*

*netif_rx_* functions is obsolete and removed in newer kernels so
we need to use corresponding *napi_* functions instead.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoV4L/DVB (10978): Report tuning algorith correctly
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>
15 years agoV4L/DVB (10977): STB6100 init fix, the call to stb6100_set_bandwidth needs an argument
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>
15 years agoV4L/DVB (10976): Bug fix: For legacy applications stv0899 performs search only first...
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>
15 years agoV4L/DVB (10975): Bug: Use signed types, Offsets and range can be negative
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>
15 years agoV4L/DVB (10974): Use Diseqc 3/3 mode to send data
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>
15 years agoparisc: update defconfigs
Kyle McMartin [Fri, 13 Mar 2009 05:33:34 +0000 (01:33 -0400)] 
parisc: update defconfigs

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
15 years agoparisc: define x->x mmio accessors
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>
15 years agoparisc: dino: struct device - replace bus_id with dev_name(), dev_set_name()
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>