]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
15 years agoMAINTAINERS: remove SIS 5513 IDE entry
Adrian Bunk [Tue, 10 Jun 2008 18:56:36 +0000 (20:56 +0200)]
MAINTAINERS: remove SIS 5513 IDE entry

- maintainer has not been active for years
- URLs no longer exist
- covered by the IDE SUBSYSTEM entry
- maintainer email bounces

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Lionel.Bouton@inet6.fr
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: remove the ide_etrax100 chipset type
Adrian Bunk [Tue, 10 Jun 2008 18:56:36 +0000 (20:56 +0200)]
ide: remove the ide_etrax100 chipset type

I forgot to remove the ide_etrax100 chipset type when removing the
ETRAX_IDE driver.

Reported-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoMerge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Tue, 10 Jun 2008 15:00:40 +0000 (08:00 -0700)]
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6

* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] tape_3590.c: introduce missing kfree
  [S390] Fix __ctl_load/__ctl_store inline assembly constraints
  [S390] Fix build failure in __cpu_up()
  [S390] vt220 console, initialize list head before use
  [S390] cio: Fix inverted isc priorities.
  [S390] vmemmap: fix off-by-one bug.
  [S390] cio: Fix sparse warnings in blacklist.c.
  [S390] sparsemem: use SPARSEMEM_STATIC if !64BIT.

15 years agoshm: Remove silly double assignment
Neil Horman [Tue, 10 Jun 2008 12:53:39 +0000 (08:53 -0400)]
shm: Remove silly double assignment

Found a silly double assignment of err is do_shmat.  Silly, but good to
clean up the useless code.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosched: fix TASK_WAKEKILL vs SIGKILL race
Oleg Nesterov [Sun, 8 Jun 2008 17:20:41 +0000 (21:20 +0400)]
sched: fix TASK_WAKEKILL vs SIGKILL race

schedule() has the special "TASK_INTERRUPTIBLE && signal_pending()" case,
this allows us to do

current->state = TASK_INTERRUPTIBLE;
schedule();

without fear to sleep with pending signal.

However, the code like

current->state = TASK_KILLABLE;
schedule();

is not right, schedule() doesn't take TASK_WAKEKILL into account. This means
that mutex_lock_killable(), wait_for_completion_killable(), down_killable(),
schedule_timeout_killable() can miss SIGKILL (and btw the second SIGKILL has
no effect).

Introduce the new helper, signal_pending_state(), and change schedule() to
use it. Hopefully it will have more users, that is why the task's state is
passed separately.

Note this "__TASK_STOPPED | __TASK_TRACED" check in signal_pending_state().
This is needed to preserve the current behaviour (ptrace_notify). I hope
this check will be removed soon, but this (afaics good) change needs the
separate discussion.

The fast path is "(state & (INTERRUPTIBLE | WAKEKILL)) + signal_pending(p)",
basically the same that schedule() does now. However, this patch of course
bloats schedule().

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years ago[S390] tape_3590.c: introduce missing kfree
Julia Lawall [Tue, 10 Jun 2008 08:03:25 +0000 (10:03 +0200)]
[S390] tape_3590.c: introduce missing kfree

The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

@r exists@
expression E,E1;
statement S;
position p1,p2,p3;
@@

E =@p1 \(kmalloc\|kcalloc\|kzalloc\)(...)
... when != E = E1
if (E == NULL || ...) S
... when != E = E1
if@p2 (...) {
 ... when != kfree(E)
 }
... when != E = E1
kfree@p3(E);

@forall@
position r.p2;
expression r.E;
int E1 != 0;
@@

* if@p2 (...) {
 ... when != kfree(E)
     when strict
return E1; }

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] Fix __ctl_load/__ctl_store inline assembly constraints
Martin Schwidefsky [Tue, 10 Jun 2008 08:03:24 +0000 (10:03 +0200)]
[S390] Fix __ctl_load/__ctl_store inline assembly constraints

__ctl_load/__ctl_store are called with either an array of unsigned long or
a single unsigned long value. Add an address operator to the "m"/"=m"
contraints to make them work for unsigned long arguments as well.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] Fix build failure in __cpu_up()
Segher Boessenkool [Tue, 10 Jun 2008 08:03:23 +0000 (10:03 +0200)]
[S390] Fix build failure in __cpu_up()

The first argument to __ctl_store() should be the array to store
stuff in, not just the first element of that array.  With the
current code in __cpu_up(), mainline GCC dies with an internal
compiler error.  I didn't diagnose that further, but just fixed
the kernel bug.

Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
15 years ago[S390] vt220 console, initialize list head before use
Carsten Otte [Tue, 10 Jun 2008 08:03:22 +0000 (10:03 +0200)]
[S390] vt220 console, initialize list head before use

This patch fixes a null pointer dereference during initialisation when no
sclp event facility is available:
sclp vt220 tty driver: could not register vt220 - sclp_register returned -5
Unable to handle kernel paging request at virtual user address 0000000000000000
Oops: 0004 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 Not tainted 2.6.26-rc3-kvm-bigiron-00968-gd939e93-dirty #30
Process swapper (pid: 0, task: 0000000000600be0, ksp: 000000000064a000)
Krnl PSW : 0400000180000000 0000000000320d8c (sclp_unregister+0x48/0x8c)
           R:0 T:1 IO:0 EX:0 Key:0 M:0 W:0 P:0 AS:0 CC:0 PM:0 EA:3
Krnl GPRS: 0000000000000000 0000000000000000 0000000000630478 0700000000649c20
           0000000000000000 0000000000433060 000000000064a660 0000000002e26000
           00000000006db000 0000000000000000 0000000000a78578 0000000000649b80
           0000000000630dc0 000000000044fa20 0000000000320d76 0000000000649b80
Krnl Code: 0000000000320d7ce310c0080004       lg      %r1,8(%r12)
           0000000000320d82b9040032           lgr     %r3,%r2
           0000000000320d86c02000187b79       larl    %r2,630478
          >0000000000320d8ce34010000024       stg     %r4,0(%r1)
           0000000000320d92e31040080024       stg     %r1,8(%r4)
           0000000000320d98c01100200200       lgfi    %r1,2097664
           0000000000320d9ee310c0080024       stg     %r1,8(%r12)
           0000000000320da4c01100100100       lgfi    %r1,1048832
Call Trace:
([<0000000000320d76>] sclp_unregister+0x32/0x8c)
 [<00000000006657b4>] __sclp_vt220_cleanup+0xc4/0xe0
 [<000000000066595c>] __sclp_vt220_init+0x18c/0x1a0
 [<0000000000665aba>] sclp_vt220_con_init+0x42/0x68
 [<00000000006601ca>] console_init+0x4e/0x68
 [<000000000064acae>] start_kernel+0x3a2/0x4dc
 [<0000000000100020>] _stext+0x20/0x80
INFO: lockdep is turned off.
Last Breaking-Event-Address:
 [<000000000041f964>] _spin_lock_irqsave+0xb0/0xb4
 <4>---[ end trace 31fd0ba7d8756001 ]---

The issue is caused by a list_empty() check in __sclp_vt220_cleanup, which
usually fails on non-initialized list heads that contain {NULL,NULL} instead.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: Fix inverted isc priorities.
Cornelia Huck [Tue, 10 Jun 2008 08:03:21 +0000 (10:03 +0200)]
[S390] cio: Fix inverted isc priorities.

Priorities for I/O interruption subclasses range from 0 (highest)
to 7 (lowest). Unfortunately, the console has been using isc 7
instead of an isc with a higher priority than regular I/O
subchannels (which use 3). Fix this by making the console use
isc 1.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] vmemmap: fix off-by-one bug.
Heiko Carstens [Tue, 10 Jun 2008 08:03:20 +0000 (10:03 +0200)]
[S390] vmemmap: fix off-by-one bug.

If a memory range is supposed to be added to the 1:1 mapping and it
ends just below the maximum supported physical address it won't
succeed. This is because a test doesn't consider that the end address
is 1 smaller than start + size.
Fix the comparison.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] cio: Fix sparse warnings in blacklist.c.
Cornelia Huck [Tue, 10 Jun 2008 08:03:19 +0000 (10:03 +0200)]
[S390] cio: Fix sparse warnings in blacklist.c.

sparse complains about signedness:

drivers/s390/cio/blacklist.c:132:28: warning: incorrect type in
argument 2 (different signedness)
drivers/s390/cio/blacklist.c:132:28:    expected unsigned int *val
drivers/s390/cio/blacklist.c:132:28:    got int *cssid
drivers/s390/cio/blacklist.c:136:28: warning: incorrect type in
argument 2 (different signedness)
drivers/s390/cio/blacklist.c:136:28:    expected unsigned int *val
drivers/s390/cio/blacklist.c:136:28:    got int *ssid
drivers/s390/cio/blacklist.c:140:28: warning: incorrect type in
argument 2 (different signedness)
drivers/s390/cio/blacklist.c:140:28:    expected unsigned int *val
drivers/s390/cio/blacklist.c:140:28:    got int *devno

cssid, ssid and devno are of course unsigned, so let's make the
variables unsigned as well.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years ago[S390] sparsemem: use SPARSEMEM_STATIC if !64BIT.
Heiko Carstens [Tue, 10 Jun 2008 08:03:18 +0000 (10:03 +0200)]
[S390] sparsemem: use SPARSEMEM_STATIC if !64BIT.

In case of !64BIT kernel we end up with a zero sized mem_section array.
This happens because NR_MEM_SECTIONS is smaller than SECTIONS_PER_ROOT
but we have:

#define NR_SECTION_ROOTS (NR_MEM_SECTIONS / SECTIONS_PER_ROOT)

and

struct mem_section *mem_section[NR_SECTION_ROOTS];

So fix this by selecting SPARSEMEM_STATIC which makes sure
that SECTIONS_PER_ROOT is 1.

Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
15 years agoMAINTAINERS: update PPPoE maintainer address
Chris Wright [Mon, 9 Jun 2008 23:07:28 +0000 (16:07 -0700)]
MAINTAINERS: update PPPoE maintainer address

Cc: Michal Ostrowski <mostrows@earthlink.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Tue, 10 Jun 2008 02:28:54 +0000 (19:28 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/core: Remove IB_DEVICE_SEND_W_INV capability flag
  IB/umem: Avoid sign problems when demoting npages to integer

15 years agoMerge git://git.infradead.org/users/cbou/battery-2.6.26
Linus Torvalds [Tue, 10 Jun 2008 02:28:31 +0000 (19:28 -0700)]
Merge git://git.infradead.org/users/cbou/battery-2.6.26

* git://git.infradead.org/users/cbou/battery-2.6.26:
  power_supply: Fix race in power_supply_uevent

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney...
Linus Torvalds [Tue, 10 Jun 2008 02:27:52 +0000 (19:27 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6:
  Blackfin serial driver: fix up tty core set_ldisc API change breakage bug
  Blackfin arch: protect only the SPI bus controller with CONFIG_SPI_BFIN
  Blackfin arch: fixup warnings with the new cplb saved values
  Blackfin Serial Driver: Clean up BF54x macro in blackfin UART driver.

15 years agoipv6 netns: init net is used to set bindv6only for new sock
Pavel Emelyanov [Mon, 9 Jun 2008 22:53:30 +0000 (15:53 -0700)]
ipv6 netns: init net is used to set bindv6only for new sock

The bindv6only is tuned via sysctl. It is already on a struct net
and per-net sysctls allow for its modification (ipv6_sysctl_net_init).

Despite this the value configured in the init net is used for the
rest of them.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoirda: net/irda build fix: mcs7780
Ingo Molnar [Mon, 9 Jun 2008 22:47:38 +0000 (15:47 -0700)]
irda: net/irda build fix: mcs7780

-tip testing found the following build error:

  drivers/built-in.o: In function `mcs_receive_irq':
  mcs7780.c:(.text+0x4e429): undefined reference to `crc32_le'
  drivers/built-in.o: In function `mcs_hard_xmit':
  mcs7780.c:(.text+0x4e9af): undefined reference to `crc32_le'

with:

  http://redhat.com/~mingo/misc/config-Sun_Jun__8_22_56_14_CEST_2008.bad

the reason is a missing enablement of the CRC32 library in the Kconfig.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Update version to 3.92.1
Matt Carlson [Mon, 9 Jun 2008 22:41:33 +0000 (15:41 -0700)]
tg3: Update version to 3.92.1

This patch increments the version to 3.92.1.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Fix 5761 WOL
Matt Carlson [Mon, 9 Jun 2008 22:41:12 +0000 (15:41 -0700)]
tg3: Fix 5761 WOL

On 5761 non-e devices, two problems prevent the administrator from
overriding the WOL settings in the device's NVRAM.

The first problem is that GPIO 0 and GPIO 2 have been swapped.  This
change prevented the administrator from turning on WOL when it is
disabled in NVRAM.  The fix is to add a new path for the 5761 that
swaps the two GPIOs in the code as well.

The second problem is that GPIO 1 could not be toggled by the driver
because the GPIO is shared with the debug UART GPIO.  This will prevent
the administrator from being able to turn WOL off if it was enabled in
NVRAM.  The fix is to always disable the debug UART after a GRC reset.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Fix a flags typo
Matt Carlson [Mon, 9 Jun 2008 22:40:26 +0000 (15:40 -0700)]
tg3: Fix a flags typo

This patch fixes a problem where the TG3_FLAG_10_100_ONLY flag was
testing against the wrong flags variable.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Fix 5714S / 5715S / 5780S link failures
Matt Carlson [Mon, 9 Jun 2008 22:39:55 +0000 (15:39 -0700)]
tg3: Fix 5714S / 5715S / 5780S link failures

The git commit ef167e27039eeaea6d3cdd5c547b082e89840bdd entitled
"Fix supporting flowctrl code" introduced a bug that prevents 5714S,
5715S and 5780S devices from falling back to a forced link mode.  The
problem is that the added flow control check will always fail if flow
control is set to autoneg and either RX or TX (or both) flow control
is enabled.  The driver defaults to setting flow control to autoneg
and advertises both RX and TX flow control.

The fix is to remove the errant check.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agopower_supply: Fix race in power_supply_uevent
Dmitry Baryshkov [Sun, 8 Jun 2008 15:43:42 +0000 (19:43 +0400)]
power_supply: Fix race in power_supply_uevent

Commit 54d29ad33e3483bcc7ca433a21cf294854e5154a (Power Supply: fix race
in device_create) introduced a race in power_supply_uevent. Previously it
checked that power_supply is available by checking for dev->driver_data.
But now dev->driver_data is set before power_supply->dev is initialised.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
15 years agoiwlwifi: fix oops in iwl3945_led_brightness_set
Marcin Slusarz [Sun, 8 Jun 2008 11:13:06 +0000 (13:13 +0200)]
iwlwifi: fix oops in iwl3945_led_brightness_set

fix race between:
ieee80211_open->ieee80211_led_radio->led_trigger_event->led_set_brightness->iwl3945_led_brightness_set
(which assumes that "led->priv" is not NULL)
and
iwl3945_pci_probe->iwl3945_setup_deferred_work->(...)->iwl3945_bg_alive_start->iwl3945_alive_start->iwl3945_led_register->iwl3945_led_register_led
which sets priv field in struct iwl3945_led
after
led->led_dev.brightness_set = iwl3945_led_brightness_set;
(...)
led_classdev_register(device, &led->led_dev);

http://kerneloops.org/guilty.php?guilty=iwl3945_led_brightness_set&version=2.6.25-release&start=1671168&end=1703935&class=oops

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Zhu Yi <yi.zhu@intel.com>
Cc: Reinette Chatre <reinette.chatre@intel.com>
Cc: Tomas Winkler <tomas.winkler@intel.com>
Cc: linux-wireless@vger.kernel.org
Cc: ipw3945-devel@lists.sourceforge.net
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoinclude/linux/ssb/ssb_driver_gige.h typo fix
Adrian Bunk [Thu, 5 Jun 2008 18:29:49 +0000 (21:29 +0300)]
include/linux/ssb/ssb_driver_gige.h typo fix

This patch fixes a typo in the name of a config variable.

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Reviewed-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Checking IBSS support while changing channel in ad-hoc mode
Assaf Krauss [Thu, 5 Jun 2008 16:55:21 +0000 (19:55 +0300)]
mac80211: Checking IBSS support while changing channel in ad-hoc mode

This patch adds a check to the set_channel flow. When attempting to change
the channel while in IBSS mode, and the new channel does not support IBSS
mode, the flow return with an error value with no consequences on the
mac80211 and driver state.

Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: decrease IBSS creation latency
Dan Williams [Wed, 4 Jun 2008 17:59:34 +0000 (13:59 -0400)]
mac80211: decrease IBSS creation latency

Sufficient scans (at least 2 or 3) should have been done within 7
seconds to find an existing IBSS to join.  This should improve IBSS
creation latency; and since IBSS merging is still in effect, shouldn't
have detrimental effects on eventual IBSS convergence.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agozd1211rw: Fix data padding for QoS
Michael Buesch [Thu, 5 Jun 2008 14:55:10 +0000 (16:55 +0200)]
zd1211rw: Fix data padding for QoS

This patch fixes a data alignment issue in the zd1211rw driver.
The IEEE80211_STYPE_QOS_DATA bit should be used as a bitwise test
to test for the presence of the 2 byte QoS control field.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Fixing slow IBSS rejoin
Assaf Krauss [Wed, 4 Jun 2008 17:27:59 +0000 (20:27 +0300)]
mac80211: Fixing slow IBSS rejoin

This patch fixes the issue of slow reconnection to an IBSS cell after
disconnection from it. Now the interface's bssid is reset upon ifdown.

ieee80211_sta_find_ibss:
if (found && memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0 &&
    (bss = ieee80211_rx_bss_get(dev, bssid,
local->hw.conf.channel->center_freq,
ifsta->ssid, ifsta->ssid_len)))

Note:
In general disconnection is still not handled properly in mac80211

Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agolibertas: fix sleep confirmation
Holger Schurig [Wed, 4 Jun 2008 09:10:40 +0000 (11:10 +0200)]
libertas: fix sleep confirmation

This fixes an issus that made "iwconfig eth1 power on" non-working.
When we get a "PS sleep" event, we have to confirm this to the firmware.
The confirm happens with a command, but this command is special: the
firmware won't send us a response. if_cs_host_to_card() is setting
priv->dnld_sent anyway, so this variable stayed at DNLD_DATA_SENT and
was never cleared back.

Now I put the special knowledge that the CMD_802_11_PS_MODE with
CMD_SUBCMD_SLEEP_CONFIRMED doesn't need to need a response by directly
clearing the dnld_sent state in lbs_send_confirmsleep().

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: send association event on IBSS create
Dan Williams [Wed, 4 Jun 2008 03:39:55 +0000 (23:39 -0400)]
mac80211: send association event on IBSS create

Otherwise userspace has no idea the IBSS creation succeeded.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoipw2200: queue direct scans
Dan Williams [Mon, 2 Jun 2008 21:51:23 +0000 (17:51 -0400)]
ipw2200: queue direct scans

When another scan is in progress, a direct scan gets dropped on the
floor.  However, that direct scan is usually the scan that's really
needed by userspace, and gets stomped on by all the broadcast scans the
ipw2200 driver issues internally.  Make sure the direct scan happens
eventually, and as a bonus ensure that the passive scan worker is
cleaned up when appropriate.

The change of request_passive_scan form a struct work to struct
delayed_work is only to make the set_wx_scan() code a bit simpler, it's
still only used with a delay of 0 to match previous behavior.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
Linus Torvalds [Mon, 9 Jun 2008 18:27:55 +0000 (11:27 -0700)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] Fix format string bug.

15 years ago[CPUFREQ] Fix format string bug.
Chris Wright [Sat, 7 Jun 2008 04:26:02 +0000 (21:26 -0700)]
[CPUFREQ] Fix format string bug.

Format string bug.  Not exploitable, as this is only writable by root,
but worth fixing all the same.

Spotted-by: Ilja van Sprundel <ilja@netric.org>
Signed-off-by: Dave Jones <davej@redhat.com>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Mon, 9 Jun 2008 17:23:45 +0000 (10:23 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  [ALSA] hda - Fix "alc262_sony_unsol[]" hda_verb array

15 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Mon, 9 Jun 2008 17:23:29 +0000 (10:23 -0700)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] ehea: Remove dependency on MEMORY_HOTPLUG
  [POWERPC] Make walk_memory_resource available with MEMORY_HOTPLUG=n
  [POWERPC] Use dev_set_name in pci_64.c
  [POWERPC] Fix incorrect enabling of VMX when building signal or user context
  [POWERPC] boot/Makefile CONFIG_ variable fixes

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.26
Linus Torvalds [Mon, 9 Jun 2008 17:23:03 +0000 (10:23 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.26

* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.26:
  sh: Add -mno-fdpic to default flags.
  sh: add resource of USB host for SH7723
  usb: r8a66597-hcd: Add support for SH7723 USB host
  sh: Fix compile error SH7763 setup code
  sh: Add SH7723 SCIF support

15 years agomm: Minor clean-up of page flags in mm/page_alloc.c
Russ Anderson [Mon, 9 Jun 2008 16:18:45 +0000 (11:18 -0500)]
mm: Minor clean-up of page flags in mm/page_alloc.c

Minor source code cleanup of page flags in mm/page_alloc.c.
Move the definition of the groups of bits to page-flags.h.

The purpose of this clean up is that the next patch will
conditionally add a page flag to the groups.  Doing that
in a header file is cleaner than adding #ifdefs to the
C code.

Signed-off-by: Russ Anderson <rja@sgi.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFix invalid access errors in blk_lookup_devt
Linus Torvalds [Mon, 9 Jun 2008 17:06:24 +0000 (10:06 -0700)]
Fix invalid access errors in blk_lookup_devt

Commit 30f2f0eb4bd2c43d10a8b0d872c6e5ad8f31c9a0 ("block: do_mounts -
accept root=<non-existant partition>") extended blk_lookup_devt() to be
able to look up partitions that had not yet been registered, but in the
process made the assumption that the '&block_class.devices' list only
contains disk devices and that you can do 'dev_to_disk(dev)' on them.

That isn't actually true.  The block_class device list also contains the
partitions we've discovered so far, and you can't just do a
'dev_to_disk()' on those.

So make sure to only work on devices that block/genhd.c has registered
itself, something we can test by checking the 'dev->type' member.  This
makes the loop in blk_lookup_devt() match the other such loops in this
file.

[ We may want to do an alternate version that knows to handle _either_
  whole-disk devices or partitions, but for now this is the minimal fix
  for a series of crashes reported by Mariusz Kozlowski in

http://lkml.org/lkml/2008/5/25/25

  and Ingo in

http://lkml.org/lkml/2008/6/9/39 ]

Reported-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Reported-by: Ingo Molnar <mingo@elte.hu>
Cc: Neil Brown <neilb@suse.de>
Cc: Joao Luis Meloni Assirati <assirati@nonada.if.usp.br>
Acked-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoIB/core: Remove IB_DEVICE_SEND_W_INV capability flag
Roland Dreier [Mon, 9 Jun 2008 16:58:42 +0000 (09:58 -0700)]
IB/core: Remove IB_DEVICE_SEND_W_INV capability flag

In 2.6.26, we added some support for send with invalidate work
requests, including a device capability flag to indicate whether a
device supports such requests.  However, the support was incomplete:
the completion structure was not extended with a field for the key
contained in incoming send with invalidate requests.

Full support for memory management extensions (send with invalidate,
local invalidate, fast register through a send queue, etc) is planned
for 2.6.27.  Since send with invalidate is not very useful by itself,
just remove the IB_DEVICE_SEND_W_INV bit before the 2.6.26 final
release; we will add an IB_DEVICE_MEM_MGT_EXTENSIONS bit in 2.6.27,
which makes things simpler for applications, since they will not have
quite as confusing an array of fine-grained bits to check.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years ago[ALSA] hda - Fix "alc262_sony_unsol[]" hda_verb array
Akio Idehara [Mon, 9 Jun 2008 13:46:07 +0000 (22:46 +0900)]
[ALSA] hda - Fix "alc262_sony_unsol[]" hda_verb array

I think that hda_verb array must have "terminator (empty array)".
But alc262_sony_unsol[] does not have it.
And it causes gcc-4.3's buggy behavior
with snd_hda_sequence_write().

Signed-off-by: Akio Idehara <zbe64533@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agosh: Add -mno-fdpic to default flags.
Paul Mundt [Mon, 9 Jun 2008 07:49:43 +0000 (16:49 +0900)]
sh: Add -mno-fdpic to default flags.

Presently the --fdpic specifier and the --isa matching clash when
building with FDPIC toolchains. As we have no interest in building the
kernel with --fdpic in the first place, always try to add in -mno-fdpic
to the default flags.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: add resource of USB host for SH7723
Yoshihiro Shimoda [Thu, 5 Jun 2008 12:21:04 +0000 (21:21 +0900)]
sh: add resource of USB host for SH7723

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agousb: r8a66597-hcd: Add support for SH7723 USB host
Yoshihiro Shimoda [Mon, 9 Jun 2008 07:00:32 +0000 (16:00 +0900)]
usb: r8a66597-hcd: Add support for SH7723 USB host

R8A66597 is similar to SH7723 USB 2.0 Host/Function module.
In addition, the USB of SH7366 is compatible with SH7723.
It can support SH7723 USB host by changing Kconfig.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Fix compile error SH7763 setup code
Nobuhiro Iwamatsu [Wed, 4 Jun 2008 08:16:15 +0000 (17:16 +0900)]
sh: Fix compile error SH7763 setup code

SH7763's setup code use old DECLARE_INTC_DESC.
There was a compile error because of this.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Add SH7723 SCIF support
Yusuke.Goda [Wed, 4 Jun 2008 10:22:59 +0000 (19:22 +0900)]
sh: Add SH7723 SCIF support

Signed-off-by: Yusuke Goda <goda.yusuke@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years ago[POWERPC] ehea: Remove dependency on MEMORY_HOTPLUG
Nathan Lynch [Tue, 3 Jun 2008 22:31:28 +0000 (08:31 +1000)]
[POWERPC] ehea: Remove dependency on MEMORY_HOTPLUG

Now that walk_memory_resource() is available regardless of
MEMORY_HOTPLUG's setting, this dependency is not needed.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years ago[POWERPC] Make walk_memory_resource available with MEMORY_HOTPLUG=n
Nathan Lynch [Tue, 3 Jun 2008 22:30:54 +0000 (08:30 +1000)]
[POWERPC] Make walk_memory_resource available with MEMORY_HOTPLUG=n

The ehea driver was recently changed[1] to use walk_memory_resource() to
detect the system's memory layout.  However, walk_memory_resource() is
available only when memory hotplug is enabled.  So CONFIG_EHEA was
made to depend on MEMORY_HOTPLUG [2], but it is inappropriate for a
network driver to have such a dependency.

Make the declaration of walk_memory_resource() and its powerpc
implementation (ehea is powerpc-specific) unconditionally available.

[1] 48cfb14f8b89d4d5b3df6c16f08b258686fb12ad
    "ehea: Add DLPAR memory remove support"

[2] fb7b6ca2b6b7c23b52be143bdd5f55a23b9780c8
    "ehea: Add dependency to Kconfig"

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Acked-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years ago[POWERPC] Use dev_set_name in pci_64.c
Stephen Rothwell [Tue, 3 Jun 2008 03:36:11 +0000 (13:36 +1000)]
[POWERPC] Use dev_set_name in pci_64.c

During the next merge window, pci_name()'s return value will become
const, so use the new dev_set_name() instead to avoid the warning (from
linux-next):

arch/powerpc/kernel/pci_64.c: In function 'of_create_pci_dev':
arch/powerpc/kernel/pci_64.c:193: warning: passing argument 1 of 'sprintf' discards qualifiers from pointer target type

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years ago[POWERPC] Fix incorrect enabling of VMX when building signal or user context
Benjamin Herrenschmidt [Mon, 2 Jun 2008 06:22:59 +0000 (16:22 +1000)]
[POWERPC] Fix incorrect enabling of VMX when building signal or user context

When building a signal or a ucontext, we can incorrectly set the MSR_VEC
bit of the kernel pt_regs->msr before returning to userspace if the task
-ever- used VMX.

This can lead to funny result if that stack used it in the past, then
"lost" it (ie. it wasn't enabled after a context switch for example)
and then called get_context.  It can end up with VMX enabled and the
registers containing values from some other task.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years ago[POWERPC] boot/Makefile CONFIG_ variable fixes
Adrian Bunk [Wed, 21 May 2008 17:38:28 +0000 (03:38 +1000)]
[POWERPC] boot/Makefile CONFIG_ variable fixes

This corrects the names of two CONFIG_ variables.

Note that the CONFIG_MPC86XADS fix uncovers another bug
(with mpc866_ads_defconfig) that will require fixing:

<--  snip  -->

...
arch/powerpc/boot/dtc -O dtb -o arch/powerpc/boot/mpc866ads.dtb -b 0  /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/powerpc/boot/dts/mpc866ads.dts
DTC: dts->dtb  on file "/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/powerpc/boot/dts/mpc866ads.dts"
  WRAP    arch/powerpc/boot/cuImage.mpc866ads
powerpc64-linux-ld: arch/powerpc/boot/cuboot-mpc866ads.o: No such file: No such file or directory
make[2]: *** [arch/powerpc/boot/cuImage.mpc866ads] Error 1

<--  snip  -->

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agofat_valid_media() isn't for userspace
Adrian Bunk [Sun, 8 Jun 2008 18:43:10 +0000 (21:43 +0300)]
fat_valid_media() isn't for userspace

Commit 73f20e58b1d586e9f6d3ddc3aad872829aca7743 ("FAT_VALID_MEDIA():
remove pointless test") wrongly added the new fat_valid_media() function
to the userspace-visible part of include/linux/msdos_fs.h

Move it to the part of include/linux/msdos_fs.h that is not exported to
userspace.

Reported-by: Onur Küçük <onur@pardus.org.tr>
Reported-by: S.Çağlar Onur <caglar@pardus.org.tr>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoBlackfin serial driver: fix up tty core set_ldisc API change breakage bug
Graf Yang [Sat, 7 Jun 2008 07:36:33 +0000 (15:36 +0800)]
Blackfin serial driver: fix up tty core set_ldisc API change breakage bug

This is the patch that follows Linus's modification about set_ldisc.
Graf has built and tested it on BF537 using Linus's git Tree.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: protect only the SPI bus controller with CONFIG_SPI_BFIN
Mike Frysinger [Sat, 7 Jun 2008 07:03:01 +0000 (15:03 +0800)]
Blackfin arch: protect only the SPI bus controller with CONFIG_SPI_BFIN

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoIB/umem: Avoid sign problems when demoting npages to integer
Roland Dreier [Sat, 7 Jun 2008 04:38:37 +0000 (21:38 -0700)]
IB/umem: Avoid sign problems when demoting npages to integer

On a 64-bit architecture, if ib_umem_get() is called with a size value
that is so big that npages is negative when cast to int, then the
length of the page list passed to get_user_pages(), namely

min_t(int, npages, PAGE_SIZE / sizeof (struct page *))

will be negative, and get_user_pages() will immediately return 0 (at
least since 900cf086, "Be more robust about bad arguments in
get_user_pages()").  This leads to an infinite loop in ib_umem_get(),
since the code boils down to:

while (npages) {
ret = get_user_pages(...);
npages -= ret;
}

Fix this by taking the minimum as unsigned longs, so that the value of
npages is never truncated.

The impact of this bug isn't too severe, since the value of npages is
checked against RLIMIT_MEMLOCK, so a process would need to have an
astronomical limit or have CAP_IPC_LOCK to be able to trigger this,
and such a process could already cause lots of mischief.  But it does
let buggy userspace code cause a kernel lock-up; for example I hit
this with code that passes a negative value into a memory registartion
function where it is promoted to a huge u64 value.

Cc: <stable@kernel.org>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Linus Torvalds [Fri, 6 Jun 2008 22:30:53 +0000 (15:30 -0700)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: enable barriers by default
  jbd2: Fix barrier fallback code to re-lock the buffer head
  ext4: Display the journal_async_commit mount option in /proc/mounts
  jbd2: If a journal checksum error is detected, propagate the error to ext4
  jbd2: Fix memory leak when verifying checksums in the journal
  ext4: fix online resize bug
  ext4: Fix uninit block group initialization with FLEX_BG
  ext4: Fix use of uninitialized data with debug enabled.

15 years agoKVM: MMU: Fix is_empty_shadow_page() check
Avi Kivity [Tue, 20 May 2008 13:21:13 +0000 (16:21 +0300)]
KVM: MMU: Fix is_empty_shadow_page() check

The check is only looking at one of two possible empty ptes.

Signed-off-by: Avi Kivity <avi@qumranet.com>
15 years agouml: activate_mm: remove the dead PF_BORROWED_MM check
Oleg Nesterov [Fri, 6 Jun 2008 18:31:39 +0000 (11:31 -0700)]
uml: activate_mm: remove the dead PF_BORROWED_MM check

use_mm() was changed to use switch_mm() instead of activate_mm(), since
then nobody calls (and nobody should call) activate_mm() with
PF_BORROWED_MM bit set.

As Jeff Dike pointed out, we can also remove the "old != new" check, it is
always true.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoKVM: MMU: Fix printk() format string
Avi Kivity [Tue, 20 May 2008 13:21:58 +0000 (16:21 +0300)]
KVM: MMU: Fix printk() format string

Signed-off-by: Avi Kivity <avi@qumranet.com>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Fri, 6 Jun 2008 18:33:30 +0000 (11:33 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/ipath: Fix SM trap forwarding
  IB/ehca: Reject send WRs only for RESET, INIT and RTR state
  MAINTAINERS: Update NetEffect (iw_nes) entry
  IB/ipath: Fix device capability flags
  IB/ipath: Avoid test_bit() on u64 SDMA status value

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Fri, 6 Jun 2008 18:33:08 +0000 (11:33 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  x86/PCI: add workaround for bug in ASUS A7V600 BIOS (rev 1005)
  PCI/x86: fix up PCI stuff so that PCI_GOANY supports OLPC

15 years agoKVM: IOAPIC: only set remote_irr if interrupt was injected
Marcelo Tosatti [Thu, 5 Jun 2008 03:08:11 +0000 (00:08 -0300)]
KVM: IOAPIC: only set remote_irr if interrupt was injected

There's a bug in the IOAPIC code for level-triggered interrupts. Its
relatively easy to trigger by sharing (virtio-blk + usbtablet was the
testcase, initially reported by Gerd von Egidy).

The "remote_irr" variable is used to indicate accepted but not yet acked
interrupts. Its cleared from the EOI handler.

Problem is that the EOI handler clears remote_irr unconditionally, even
if it reinjected another pending interrupt.

In that case, kvm_ioapic_set_irq() proceeds to ioapic_service() which
sets remote_irr even if it failed to inject (since the IRR was high due
to EOI reinjection).

Since the TMR bit has been cleared by the first EOI, the second one
fails to clear remote_irr.

End result is interrupt line dead.

Fix it by setting remote_irr only if a new pending interrupt has been
generated (and the TMR bit for vector in question set).

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Fri, 6 Jun 2008 18:32:37 +0000 (11:32 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  sound: emu10k1 - fix system hang with Audigy2 ZS Notebook PCMCIA card

15 years agoKVM: MMU: reschedule during shadow teardown
Avi Kivity [Wed, 4 Jun 2008 15:42:24 +0000 (18:42 +0300)]
KVM: MMU: reschedule during shadow teardown

Shadows for large guests can take a long time to tear down, so reschedule
occasionally to avoid softlockup warnings.

Signed-off-by: Avi Kivity <avi@qumranet.com>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/chrisw...
Linus Torvalds [Fri, 6 Jun 2008 18:31:55 +0000 (11:31 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/chrisw/lsm-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/chrisw/lsm-2.6:
  capabilities: remain source compatible with 32-bit raw legacy capability support.
  LSM: remove stale web site from MAINTAINERS

15 years agoMerge git://git.infradead.org/~dwmw2/mtd-2.6.26
Linus Torvalds [Fri, 6 Jun 2008 18:31:18 +0000 (11:31 -0700)]
Merge git://git.infradead.org/~dwmw2/mtd-2.6.26

* git://git.infradead.org/~dwmw2/mtd-2.6.26:
  [MTD] m25p80.c mutex unlock fix

15 years agoipwireless: Fix blocked sending
David Sterba [Fri, 6 Jun 2008 08:56:35 +0000 (10:56 +0200)]
ipwireless: Fix blocked sending

Packet sending is driven by two flags, tx_ready and tx_queued.
It was possible, that there were queued data for sending and
hardware was flagged as blocked but in fact it was not.

The tx_queued was indicator but should be really a counter else
first fragmented packet resets tx_queued flag, but there may be
pending packets which do not get sent.

New semantics:
tx_ready - set, if hw is ready to send packet, no packet is being
           transferred right now
           set the flag right at the place where data are copied
           into hw memory and not earlier without checking if it
           was succesful
tx_queued - count of enqueued packets, including fragments

Tested-by: Michal Rokos <michal.rokos@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoKVM: VMX: Clear CR4.VMXE in hardware_disable
Eli Collins [Mon, 2 Jun 2008 03:24:40 +0000 (20:24 -0700)]
KVM: VMX: Clear CR4.VMXE in hardware_disable

Clear CR4.VMXE in hardware_disable. There's no reason to leave it set
after doing a VMXOFF.

VMware Workstation 6.5 checks CR4.VMXE as a proxy for whether the CPU is
in VMX mode, so leaving VMXE set means we'll refuse to power on. With this
change the user can power on after unloading the kvm-intel module. I
tested on kvm-67 and kvm-69.

Signed-off-by: Eli Collins <ecollins@vmware.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
15 years agovm: add kzalloc_node() inline
Jeff Layton [Fri, 6 Jun 2008 05:47:00 +0000 (22:47 -0700)]
vm: add kzalloc_node() inline

To get zeroed out memory from a particular NUMA node.  To be used by
sunrpc.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agopagemap: add documentation for pagemap
Thomas Tuttle [Fri, 6 Jun 2008 05:46:59 +0000 (22:46 -0700)]
pagemap: add documentation for pagemap

Just a quick explanation of the pagemap interface from a userspace point
of view, and an example of how to use it (in English, not code).

Signed-off-by: Thomas Tuttle <ttuttle@google.com>
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agopagemap: return EINVAL, not EIO, for unaligned reads of kpagecount or kpageflags
Thomas Tuttle [Fri, 6 Jun 2008 05:46:58 +0000 (22:46 -0700)]
pagemap: return EINVAL, not EIO, for unaligned reads of kpagecount or kpageflags

If the user tries to read from a position that is not a multiple of 8, or
read a number of bytes that is not a multiple of 8, they have passed an
invalid argument to read, for the purpose of reading these files.  It's
not an IO error because we didn't encounter any trouble finding the data
they asked for.

Signed-off-by: Thomas Tuttle <ttuttle@google.com>
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agopagemap: return map count, not reference count, in /proc/kpagecount
Thomas Tuttle [Fri, 6 Jun 2008 05:46:58 +0000 (22:46 -0700)]
pagemap: return map count, not reference count, in /proc/kpagecount

Since pagemap is all about examining pages mapped into processes' memory
spaces, it makes sense for kpagecount to return the map counts, not the
reference counts.

Signed-off-by: Thomas Tuttle <ttuttle@google.com>
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agohdaps: fix module loading on Thinkpad T61P
Tim Gardner [Fri, 6 Jun 2008 05:46:55 +0000 (22:46 -0700)]
hdaps: fix module loading on Thinkpad T61P

Adds DMI system identifier for ThinkPad T61.

Originally written by Klaus S. Madsen.

Taken from http://launchpadlibrarian.net/10864950/hdaps-t61.patch

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: maximilian attems <max@stro.at>
Cc: Klaus S. Madsen <ubuntu@hjernemadsen.org>
Cc: Mark M. Hoffman <mhoffman@lightlink.com>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoproc: calculate the correct /proc/<pid> link count
Vegard Nossum [Fri, 6 Jun 2008 05:46:53 +0000 (22:46 -0700)]
proc: calculate the correct /proc/<pid> link count

This patch:

  commit e9720acd728a46cb40daa52c99a979f7c4ff195c
  Author: Pavel Emelyanov <xemul@openvz.org>
  Date:   Fri Mar 7 11:08:40 2008 -0800

    [NET]: Make /proc/net a symlink on /proc/self/net (v3)

introduced a /proc/self/net directory without bumping the corresponding
link count for /proc/self.

This patch replaces the static link count initializations with a call that
counts the number of directory entries in the given pid_entry table
whenever it is instantiated, and thus relieves the burden of manually
keeping the two in sync.

[akpm@linux-foundation.org: cleanup]
Acked-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc: class driver for ppc_md RTC functions
David Woodhouse [Fri, 6 Jun 2008 05:46:50 +0000 (22:46 -0700)]
rtc: class driver for ppc_md RTC functions

This hooks up the platform-specific [gs]et_rtc_time functions so that
kernels using CONFIG_RTC_CLASS have RTC support on most PowerPC platforms.

A new driver, and one which we've been shipping in Fedora for a while
already, since otherwise RTC support breaks.

[akpm@linux-foundation.org: fix Kconfig indenting]
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: David Brownell <david-b@pacbell.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoasm-m32r/uaccess.h must #include <asm/setup.h>
Adrian Bunk [Fri, 6 Jun 2008 05:46:48 +0000 (22:46 -0700)]
asm-m32r/uaccess.h must #include <asm/setup.h>

This patch fixes the following compile error caused by
commit 4016a1390d07f15b267eecb20e76a48fd5c524ef
(mm/nommu.c: return 0 from kobjsize with invalid objects):

/home/bunk/linux/kernel-2.6/git/linux-2.6/mm/nommu.c: In function 'kobjsize':
/home/bunk/linux/kernel-2.6/git/linux-2.6/mm/nommu.c:112: error: 'memory_end' undeclared (first use in this function)
/home/bunk/linux/kernel-2.6/git/linux-2.6/mm/nommu.c:112: error: (Each undeclared identifier is reported only once
/home/bunk/linux/kernel-2.6/git/linux-2.6/mm/nommu.c:112: error: for each function it appears in.)

The patch also removes now no longer required memory_{start,end}
declarations inside access_ok().

Reported-by: Adrian Bunk <adrian.bunk@movial.fi>
Signed-off-by: Adrian Bunk <adrian.bunk@movial.fi>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Michael Hennerich <Michael.Hennerich@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoext3: fix online resize bug
Josef Bacik [Fri, 6 Jun 2008 05:46:47 +0000 (22:46 -0700)]
ext3: fix online resize bug

There is a bug when we are trying to verify that the reserve inode's
double indirect blocks point back to the primary gdt blocks.  The fix is
obvious, we need to mod the gdb count by the addr's per block.  You can
verify this with the following test case

dd if=/dev/zero of=disk1 seek=1024 count=1 bs=100M
losetup /dev/loop1 disk1
pvcreate /dev/loop1
vgcreate loopvg1 /dev/loop1
lvcreate -l 100%VG loopvg1 -n looplv1
mkfs.ext3 -J size=64 -b 1024 /dev/loopvg1/looplv1
mount /dev/loopvg1/looplv1 /mnt/loop
dd if=/dev/zero of=disk2 seek=1024 count=1 bs=50M
losetup /dev/loop2 disk2
pvcreate /dev/loop2
vgextend loopvg1 /dev/loop2
lvextend -l 100%VG /dev/loopvg1/looplv1
resize2fs /dev/loopvg1/looplv1

without this patch the resize2fs fails, with it the resize2fs succeeds.

Signed-off-by: Josef Bacik <jbacik@redhat.com>
Acked-by: Andreas Dilger <adilger@sun.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agonommu: fix ksize() abuse
Pekka Enberg [Fri, 6 Jun 2008 05:46:46 +0000 (22:46 -0700)]
nommu: fix ksize() abuse

The nommu binfmt code uses ksize() for pointers returned from do_mmap()
which is wrong.  This converts the call-sites to use the nommu specific
kobjsize() function which works as expected.

Cc: Christoph Lameter <clameter@sgi.com>
Cc: Matt Mackall <mpm@selenic.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Greg Ungerer <gerg@snapgear.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodoc: document the kernel-doc conventions for kernel hackers
Paul Jackson [Fri, 6 Jun 2008 05:46:45 +0000 (22:46 -0700)]
doc: document the kernel-doc conventions for kernel hackers

Provide documentation of the kernel-doc documentation conventions oriented
to kernel hackers.

Since I figure that there will be more people reading this
kernel-doc-nano-HOWTO.txt file who are kernel developers focused on the
rest of the kernel, than there will be readers of this file who are
documentation developers extracting that embedded kernel-doc
documentation, I have taken the liberty of making the new section added
here:

  How to format kernel-doc comments

the first section of the kernel-doc-nano-HOWTO.txt file.

This first section is intended to introduce, motivate and provide basic
usage of the kernel-doc mechanism for kernel hackers developing other
portions of the kernel.

Signed-off-by: Paul Jackson <pj@sgi.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofbdev: export symbol fb_mode_option
Geoff Levand [Fri, 6 Jun 2008 05:46:44 +0000 (22:46 -0700)]
fbdev: export symbol fb_mode_option

Frame buffer and mode setting drivers can be built as modules,
so fb_mode_option needs to be exported to support these.

Prevents this error:

  ERROR: "fb_mode_option" [drivers/ps3/ps3av_mod.ko] undefined!

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMAINTAINERS: reiserfs entry is out of date
Alan Cox [Fri, 6 Jun 2008 05:46:42 +0000 (22:46 -0700)]
MAINTAINERS: reiserfs entry is out of date

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Edward Shishkin <edward.shishkin@gmail.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Jan Kara <jack@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agov850: fix typo in header guard
Vegard Nossum [Fri, 6 Jun 2008 05:46:42 +0000 (22:46 -0700)]
v850: fix typo in header guard

Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoh8300: fix typo in header guard
Vegard Nossum [Fri, 6 Jun 2008 05:46:41 +0000 (22:46 -0700)]
h8300: fix typo in header guard

Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoatmel_serial: filter out FP during baud rate detection
Haavard Skinnemoen [Fri, 6 Jun 2008 05:46:39 +0000 (22:46 -0700)]
atmel_serial: filter out FP during baud rate detection

I made a change to u-boot that used the FP (Fractional Part) field of BRGR
to achieve more accurate baud rate generation.  Unfortunately, the
atmel_serial driver looks at the whole BRGR register when trying to detect
the baud rate that the port is currently running at, so setting FP to a
nonzero value breaks the baud rate detection.

I'll sit on the u-boot patch for a while longer, but this is clearly a
bug in the atmel_serial driver which should be fixed.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agovt: fix vc_resize locking
Nick Piggin [Fri, 6 Jun 2008 05:46:38 +0000 (22:46 -0700)]
vt: fix vc_resize locking

Lockdep says we can't take tasklist lock or sighand lock inside ctrl_lock.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: Alan Cox <alan@redhat.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoipc: only output msgmni value at boot time
Nadia Derbey [Fri, 6 Jun 2008 05:46:38 +0000 (22:46 -0700)]
ipc: only output msgmni value at boot time

When posting:
[PATCH 1/8] Scaling msgmni to the amount of lowmem
(see http://lkml.org/lkml/2008/2/11/171), I have added a KERN_INFO message
that is output each time msgmni is recomputed.

In http://lkml.org/lkml/2008/4/29/575 Tony Luck complained that this
message references an ipc namespace address that is useless.

I first thought of using an audit_log instead of a printk, as suggested by
Serge Hallyn.  But unfortunately, we do not have any other information
than the namespace address to provide here too.  So I chose to move the
message and output it only at boot time, removing the reference to the
namespace.

Signed-off-by: Nadia Derbey <Nadia.Derbey@bull.net>
Cc: Pierre Peiffer <peifferp@gmail.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Acked-by: Tony Luck <tony.luck@intel.com>
Cc: "Serge E. Hallyn" <serue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoipc: restore MSGPOOL original value
Nadia Derbey [Fri, 6 Jun 2008 05:46:36 +0000 (22:46 -0700)]
ipc: restore MSGPOOL original value

When posting:

[PATCH 1/8] Scaling msgmni to the amount of lowmem

(see http://article.gmane.org/gmane.linux.kernel/637849/) I changed the
MSGPOOL value to make it fit what is said in the man pages (i.e.  a size
in bytes).

But Michael Kerrisk rightly complained that this change could affect the
ABI.  So I'm posting this patch to make MSGPOOL expressed back in Kbytes.
Michael, on his side, has fixed the man page.

Signed-off-by: Nadia Derbey <Nadia.Derbey@bull.net>
Cc: Pierre Peiffer <peifferp@gmail.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Acked-by: Michael Kerrisk <mtk.manpages@googlemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agovt: fix background color on line feed, DEC invert
Jan Engelhardt [Fri, 6 Jun 2008 05:46:34 +0000 (22:46 -0700)]
vt: fix background color on line feed, DEC invert

Original report: """I used to force my console to black-on-white by the
command `setterm -inversescreen on`.  In 2.6.26-rc4, I get lots of black
background characters."""

Another addendum to commit c9e587ab.  This was previously missed out since
I was not aware of what vc_decscnm was for.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Reported-by: <thunder7@xs4all.nl>
Tested-by: <thunder7@xs4all.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocpufreq: fix null object access on Transmeta CPU
CHIKAMA masaki [Fri, 6 Jun 2008 05:46:33 +0000 (22:46 -0700)]
cpufreq: fix null object access on Transmeta CPU

If cpu specific cpufreq driver(i.e.  longrun) has "setpolicy" function,
governor object isn't set into cpufreq_policy object at "__cpufreq_set_policy"
function in driver/cpufreq/cpufreq.c .

This causes a null object access at "store_scaling_setspeed" and
"show_scaling_setspeed" function in driver/cpufreq/cpufreq.c when reading or
writing through /sys interface (ex.  cat
/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed)

Addresses:
http://bugzilla.kernel.org/show_bug.cgi?id=10654
https://bugzilla.redhat.com/show_bug.cgi?id=443354

Signed-off-by: CHIKAMA Masaki <masaki.chikama@gmail.com>
Cc: Dave Jones <davej@codemonkey.org.uk>
Cc: Chuck Ebbert <cebbert@redhat.com>
Acked-by: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofbcon: fix wrong vmode bits copied on console switch
Krzysztof Helt [Fri, 6 Jun 2008 05:46:33 +0000 (22:46 -0700)]
fbcon: fix wrong vmode bits copied on console switch

The interlaced and double line mode bits should not be copied to new
console when the console is switched.  Otherwise, the new console may be
set to incorrect refresh rate.

Also, the x and y offsets does not need to be copied.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agokeys: remove unused key_alloc_sem
Daniel Walker [Fri, 6 Jun 2008 05:46:32 +0000 (22:46 -0700)]
keys: remove unused key_alloc_sem

This semaphore doesn't appear to be used, so remove it.

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocpusets: fix bug when adding nonexistent cpu or mem
Lai Jiangshan [Fri, 6 Jun 2008 05:46:32 +0000 (22:46 -0700)]
cpusets: fix bug when adding nonexistent cpu or mem

Adding a nonexistent cpu to a cpuset will be omitted quietly.  It should
return -EINVAL.

Example: (real_nr_cpus <= 4 < NR_CPUS or cpu#4 was just offline)

# cat cpus
0-1
# /bin/echo 4 > cpus
# /bin/echo $?
0
# cat cpus

#

The same occurs when add a nonexistent mem.
This patch will fix this bug.
And when *buf == "", the check is unneeded.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Paul Jackson <pj@sgi.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agopagemap: fix bug in add_to_pagemap, require aligned-length reads of /proc/pid/pagemap
Thomas Tuttle [Fri, 6 Jun 2008 05:46:31 +0000 (22:46 -0700)]
pagemap: fix bug in add_to_pagemap, require aligned-length reads of /proc/pid/pagemap

Fix a bug in add_to_pagemap.  Previously, since pm->out was a char *,
put_user was only copying 1 byte of every PFN, resulting in the top 7
bytes of each PFN not being copied.  By requiring that reads be a multiple
of 8 bytes, I can make pm->out and pm->end u64*s instead of char*s, which
makes put_user work properly, and also simplifies the logic in
add_to_pagemap a bit.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Thomas Tuttle <ttuttle@google.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodevscgroup: make white list more compact in some cases
Pavel Emelyanov [Fri, 6 Jun 2008 05:46:28 +0000 (22:46 -0700)]
devscgroup: make white list more compact in some cases

Consider you added a 'c foo:bar r' permission to some cgroup and then (a
bit later) 'c'foo:bar w' for it.  After this you'll see the

c foo:bar r
c foo:bar w

lines in a devices.list file.

Another example - consider you added 10 'c foo:bar r' permissions to some
cgroup (e.g.  by mistake).  After this you'll see 10 c foo:bar r lines in
a list file.

This is weird.  This situation also has one more annoying consequence.
Having many items in a white list makes permissions checking slower, sine
it has to walk a longer list.

The proposal is to merge permissions for items, that correspond to the
same device.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodevscgroup: check for device permissions at mount time
Pavel Emelyanov [Fri, 6 Jun 2008 05:46:27 +0000 (22:46 -0700)]
devscgroup: check for device permissions at mount time

Currently even if a task sits in an all-denied cgroup it can still mount
any block device in any mode it wants.

Put a proper check in do_open for block device to prevent this.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Tested-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodevscgroup: relax task to dev_cgroup conversion
Pavel Emelyanov [Fri, 6 Jun 2008 05:46:26 +0000 (22:46 -0700)]
devscgroup: relax task to dev_cgroup conversion

Two functions, that need to get a device_cgroup from a task (they are
devcgroup_inode_permission and devcgroup_inode_mknod) make it in a strange
way:

They get a css_set from task, then a subsys_state from css_set, then a
cgroup from the state and then a subsys_state again from the cgroup.
Besides, the devices_subsys_id is read from memory, whilst there's a
enum-ed constant for it.

Optimize this part a bit:
1. Get the subsys_stats form the task and be done - no 2 extra
   dereferences,
2. Use the device_subsys_id constant, not the value from memory
   (i.e. one less dereference).

Found while preparing 2.6.26 OpenVZ port.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Acked-by: Paul Menage <menage@google.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: James Morris <jmorris@namei.org>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodevcgroup: make a helper to convert cgroup_subsys_state to devs_cgroup
Pavel Emelyanov [Fri, 6 Jun 2008 05:46:24 +0000 (22:46 -0700)]
devcgroup: make a helper to convert cgroup_subsys_state to devs_cgroup

This is just picking the container_of out of cgroup_to_devcgroup into a
separate function.

This new css_to_devcgroup will be used in the 2nd patch.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Cc: Paul Menage <menage@google.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: James Morris <jmorris@namei.org>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agointroduce memory_read_from_buffer()
Akinobu Mita [Fri, 6 Jun 2008 05:46:21 +0000 (22:46 -0700)]
introduce memory_read_from_buffer()

This patch introduces memory_read_from_buffer().

The only difference between memory_read_from_buffer() and
simple_read_from_buffer() is which address space the function copies to.

simple_read_from_buffer copies to user space memory.
memory_read_from_buffer copies to normal memory.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Doug Warzecha <Douglas_Warzecha@dell.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Cc: Abhay Salunke <Abhay_Salunke@dell.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Markus Rechberger <markus.rechberger@amd.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Bob Moore <robert.moore@intel.com>
Cc: Thomas Renninger <trenn@suse.de>
Cc: Len Brown <lenb@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Cc: Michael Holzheu <holzheu@de.ibm.com>
Cc: Brian King <brking@us.ibm.com>
Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Andrew Vasquez <linux-driver@qlogic.com>
Cc: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agolib: export bitrev16
Harvey Harrison [Fri, 6 Jun 2008 05:46:19 +0000 (22:46 -0700)]
lib: export bitrev16

Bluetooth will be able to use this.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Dave Young <hidave.darkstar@gmail.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>