26 May, 2008

1 commit

  • These magic greps and hacks in ver_linux to get the gcc version always break after some gcc releases.

    Since now gcc >4.3 allows compiling with '--with-pkgversion' ( which can be everything 'My Cool Gcc' or something )
    ver_linux will report random junk for these.

    Simply use 'gcc -dumpversion' to get the gcc version which should always work.

    Signed-off-by: Gabriel C
    Signed-off-by: Andrew Morton
    Signed-off-by: Sam Ravnborg

    Gabriel C
     

25 May, 2008

39 commits

  • …git/x86/linux-2.6-tip

    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip:
    x86: prevent PGE flush from interruption/preemption
    x86: use explicit copy in vdso_gettimeofday()
    namespacecheck: automated fixes
    x86/xen: fix arbitrary_virt_to_machine()
    x86: don't read maxlvt before checking if APIC is mapped
    x86: disable TSC for sched_clock() when calibration failed
    x86: distangle user disabled TSC from unstable
    x86: fix setup of cyc2ns in tsc_64.c

    Linus Torvalds
     
  • * 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm:
    [ARM] integrator: fix build warnings and errors
    [ARM] fix OMAP include loops
    Revert "[ARM] pxa: spitz wants PXA27x UDC definitions"
    [ARM] 5053/1: define before use of processor_id
    [ARM] 5052/1: export clock functions for the at91x40
    [ARM] 5051/1: define pgtable_t for the !CONFIG_MMU case too
    [ARM] omap: fix omap clk support build errors
    [ARM] 5039/1: S3C244X: Rename SDI device if running on S3C244X.
    [ARM] 5043/1: pxafb: remove unused mode variable in pxafb_init_fbinfo
    [ARM] 5041/1: VR1000: Fix DM9000 IRQ flags initialisation
    [ARM] 5040/1: BAST: Fix DM9000 IRQ flags initialisation
    [ARM] 5038/1: ARM: OMAP: Remove tsc2102 references from board-palmte.c
    [ARM] 5025/2: fix collie cpu initialisation

    Linus Torvalds
     
  • Somehow the spidev code forgot to include a critical mechanism: when the
    underlying device is removed (e.g. spi_master rmmod), open file
    descriptors must be prevented from issuing new I/O requests to that
    device. On penalty of the oopsing reported by Sebastian Siewior
    ...

    This is a partial fix, adding handshaking between the lower level (SPI
    messaging) and the file operations using the spi_dev. (It also fixes an
    issue where reads and writes didn't return the number of bytes sent or
    received.)

    There's still a refcounting issue to be addressed (separately).

    Signed-off-by: David Brownell
    Reported-by: Sebastian Siewior
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • This is a slight change in the namespace cgroup subsystem api.

    The change is that previously when cgroup_clone() was called (currently
    only from the unshare path in ns_proxy cgroup, you'd get a new group named
    "node_$pid" whereas now you'll get a group named after just your pid.)

    The only users who would notice it are those who are using the ns_proxy
    cgroup subsystem to auto-create cgroups when namespaces are unshared -
    something of an experimental feature, which I think really needs more
    complete container/namespace support in order to be useful. I suspect the
    only users are Cedric and Serge, or maybe a few others on
    containers@lists.linux-foundation.org. And in fact it would only be
    noticed by the users who make the assumption about how the name is
    generated, rather than getting it from the /proc//cgroups file for
    the process in question.

    Whether the change is actually needed or not I'm fairly agnostic on, but I
    guess it is more elegant to just use the pid as the new group name rather
    than adding a fairly arbitrary "node_" prefix on the front.

    [menage@google.com: provided changelog]
    Signed-off-by: Cedric Le Goater
    Cc: "Paul Menage"
    Cc: "Serge E. Hallyn"
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Cedric Le Goater
     
  • for_each_pgdat() was renamed to for_each_online_pgdat() and kerneldoc
    comments should be updated accordingly.

    Signed-off-by: Fernando Luis Vazquez Cao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fernando Luis Vazquez Cao
     
  • Fix the following build error:

    ERROR: "empty_zero_page" [fs/ext4/ext4dev.ko] undefined!

    Reported-by: Adrian Bunk
    Signed-off-by: Adrian Bunk
    Cc: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • If none of the switch cases match, the PR_SET_PDEATHSIG and
    PR_SET_DUMPABLE cases of the switch statement will never write to local
    variable `error'.

    Signed-off-by: Shi Weihua
    Cc: Andrew G. Morgan
    Acked-by: "Serge E. Hallyn"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shi Weihua
     
  • including of causes build problems since it doesn't exist.

    Also removed warning:
    drivers/edac/mpc85xx_edac.c:45: warning: 'mpc85xx_ctl_name' defined but not used

    Signed-off-by: Kumar Gala
    Acked-by: Doug Thompson
    Acked-by: Dave Jiang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kumar Gala
     
  • This fixes various gpio-related build errors (mostly potential)
    reported in part by Russell King and Uwe Kleine-König.

    Signed-off-by: David Brownell
    Cc: Uwe Kleine-König
    Cc: Russell King
    Cc: Arnaud Patard
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Add a correct MODULE_ALIAS() entry for this driver to enable udev module
    loading.

    Signed-off-by: Ben Dooks
    Cc: Arnaud Patard
    Acked-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • Remove the old changelog entries which are now out of date and should be
    extractable from git anyway. Also tidy up the copyright for the driver.

    Signed-off-by: Ben Dooks
    Cc: Arnaud Patard
    Acked-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • Fix the following warning by checking the result of device_create_file and
    printing an error but not removing the device (loss of debug registers is
    not fatal).

    drivers/video/s3c2410fb.c:905: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result

    Signed-off-by: Ben Dooks
    Cc: Arnaud Patard
    Acked-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • When a blank level of FB_BLANK_POWERDOWN is used, we should shut down the
    controller so that it no longer tries to produce any panel signals or
    data, and shuts down the DMA which is not needed.

    Signed-off-by: Ben Dooks
    Cc: Arnaud Patard
    Acked-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • To keep backwards compatibility, reverse the meanings of these flags so
    that when they are not set, the driver uses the original behvaiour.

    Signed-off-by: Ben Dooks
    Cc: Arnaud Patard
    Acked-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • Trying to add memory via add_memory() from within an initcall function
    results in

    bootmem alloc of 163840 bytes failed!
    Kernel panic - not syncing: Out of memory

    This is caused by zone_wait_table_init() which uses system_state to decide
    if it should use the bootmem allocator or not.

    When initcalls are handled the system_state is still SYSTEM_BOOTING but
    the bootmem allocator doesn't work anymore. So the allocation will fail.

    To fix this use slab_is_available() instead as indicator like we do it
    everywhere else.

    [akpm@linux-foundation.org: coding-style fix]
    Reviewed-by: Andy Whitcroft
    Cc: Dave Hansen
    Cc: Gerald Schaefer
    Cc: KAMEZAWA Hiroyuki
    Acked-by: Yasunori Goto
    Signed-off-by: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     
  • When booting 2.6.26-rc3 on a multi-node x86_32 numa system we are seeing
    panics when trying node local allocations:

    BUG: unable to handle kernel NULL pointer dereference at 0000034c
    IP: [] get_page_from_freelist+0x4a/0x18e
    *pdpt = 00000000013a7001 *pde = 0000000000000000
    Oops: 0000 [#1] SMP
    Modules linked in:

    Pid: 0, comm: swapper Not tainted (2.6.26-rc3-00003-g5abc28d #82)
    EIP: 0060:[] EFLAGS: 00010282 CPU: 0
    EIP is at get_page_from_freelist+0x4a/0x18e
    EAX: c1371ed8 EBX: 00000000 ECX: 00000000 EDX: 00000000
    ESI: f7801180 EDI: 00000000 EBP: 00000000 ESP: c1371ec0
    DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
    Process swapper (pid: 0, ti=c1370000 task=c12f5b40 task.ti=c1370000)
    Stack: 00000000 00000000 00000000 00000000 000612d0 000412d0 00000000 000412d0
    f7801180 f7c0101c f7c01018 c10426e4 f7c01018 00000001 00000044 00000000
    00000001 c12f5b40 00000001 00000010 00000000 000412d0 00000286 000412d0
    Call Trace:
    [] __alloc_pages_internal+0x99/0x378
    [] __alloc_pages+0x7/0x9
    [] kmem_getpages+0x66/0xef
    [] cache_grow+0x8f/0x123
    [] ____cache_alloc_node+0xb9/0xe4
    [] kmem_cache_alloc_node+0x92/0xd2
    [] setup_cpu_cache+0xaf/0x177
    [] kmem_cache_create+0x2c8/0x353
    [] kmem_cache_init+0x1ce/0x3ad
    [] start_kernel+0x178/0x1ee

    This occurs when we are scanning the zonelists looking for a ZONE_NORMAL
    page. In this system there is only ZONE_DMA and ZONE_NORMAL memory on
    node 0, all other nodes are mapped above 4GB physical. Here is a dump
    of the zonelists from this system:

    zonelists pgdat=c1400000
    0: c14006c0:2 f7c006c0:2 f7e006c0:2 c1400360:1 c1400000:0
    1: c14006c0:2 c1400360:1 c1400000:0
    zonelists pgdat=f7c00000
    0: f7c006c0:2 f7e006c0:2 c14006c0:2 c1400360:1 c1400000:0
    1: f7c006c0:2
    zonelists pgdat=f7e00000
    0: f7e006c0:2 c14006c0:2 f7c006c0:2 c1400360:1 c1400000:0
    1: f7e006c0:2

    When performing a node local allocation we call get_page_from_freelist()
    looking for a page. It in turn calls first_zones_zonelist() which returns
    a preferred_zone. Where there are no applicable zones this will be NULL.
    However we use this unconditionally, leading to this panic.

    Where there are no applicable zones there is no possibility of a successful
    allocation, so simply fail the allocation.

    Signed-off-by: Andy Whitcroft
    Acked-by: Mel Gorman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • enable_irq_wake() and disable_irq_wake() need to be balanced. However,
    serial_core.c calls these for different conditions during the suspend and
    resume functions...

    This is causing a regular WARN_ON() as found at
    http://www.kerneloops.org/search.php?search=set_irq_wake

    This patch makes the conditions for triggering the _wake enable/disable
    sequence identical.

    Signed-off-by: Arjan van de Ven
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     
  • Any file under /proc/net opened more than once leaked the refcounter
    on the module it belongs to.

    The problem is that module_get is called for each file opening while
    module_put is called only when /proc inode is destroyed. So, lets put
    module counter if we are dealing with already initialised inode.

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

    Signed-off-by: Denis V. Lunev
    Cc: David Miller
    Cc: Patrick McHardy
    Acked-by: Pavel Emelyanov
    Acked-by: Robert Olsson
    Acked-by: Eric W. Biederman
    Reported-by: Roland Kletzing
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Denis V. Lunev
     
  • In 2.6.25, ramdisk devices show up in /proc/partitions, which is a
    behaviour change from the old rd.c. Add GENHD_FL_SUPPRESS_PARTITION_INFO,
    which was present in rd.c.

    All kernels prior to 2.6.25 weren't displaying ramdisks in
    /proc/partitions. Since there are many userspace tools using information
    from /proc/partitions some of them may now behave incorrectly (I didn't
    tested any though). For example before 2.6.25 /proc/partitions was empty
    if no block devices like hard disks and such were detected by kernel. Now
    all 16 ramdisks are always visible there. Some software may rely on such
    information (I mean, on empty /proc/partitions).

    There was quite similar situation back in 2004, and ramdisks were excluded
    back from displaying. Thats why I called this a regression (maybe a bit
    unfortunate). See this patch for info:
    http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.3-rc2/2.6.3-rc2-mm1/broken-out/nbd-proc-partitions-fix.patch

    I also think that someone somewhere (long time ago) excluded ramdisks from
    /proc/partitions for good reasons. It is possible that now such new
    "feature" is harmless, but I think there are more chances that someone
    will say "hey, /proc/partitions has changed, now my software doesn't work"
    then "hey where did my new 2.6.25 feature go". nbd devices are also
    excluded, maybe for very same (unknown to me) reasons.

    Signed-off-by: Marcin Krol
    Signed-off-by: Nick Piggin
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marcin Krol
     
  • This doesn't need to be two modules, and making it one cleans up the
    problem

    Signed-off-by: Alan Cox
    Cc: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • The last gpio belonging to a chip is chip->base + chip->ngpios - 1. Some
    places in the code, but not all, forgot the critical minus one.

    Signed-off-by: Trent Piepho
    Acked-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Trent Piepho
     
  • The return value of mcp23s08_read_regs() can only be evaluated when signed

    Signed-off-by: Roel Kluin
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roel Kluin
     
  • Teach drivers/gpio/pca953x.c about PCA9554, another compatible chip.

    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • __exit_signal() does flush_sigqueue(tsk->pending) outside of ->siglock.
    This can race with another thread doing sigqueue_free(), we can free the
    same SIGQUEUE_PREALLOC sigqueue twice or corrupt the pending->list.

    Note that even sys_exit_group() can trigger this race, not only
    sys_timer_delete().

    Move the callsite of flush_sigqueue(tsk->pending) under ->siglock.

    This patch doesn't touch flush_sigqueue(->shared_pending) below, it is
    called when there are no other threads which can play with signals, and
    sigqueue_free() can't be used outside of our thread group.

    Signed-off-by: Oleg Nesterov
    Acked-by: Roland McGrath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • When we get any IO error during a recovery (rebuilding a spare), we abort
    the recovery and restart it.

    For RAID6 (and multi-drive RAID1) it may not be best to restart at the
    beginning: when multiple failures can be tolerated, the recovery may be
    able to continue and re-doing all that has already been done doesn't make
    sense.

    We already have the infrastructure to record where a recovery is up to
    and restart from there, but it is not being used properly.
    This is because:
    - We sometimes abort with MD_RECOVERY_ERR rather than just MD_RECOVERY_INTR,
    which causes the recovery not be be checkpointed.
    - We remove spares and then re-added them which loses important state
    information.

    The distinction between MD_RECOVERY_ERR and MD_RECOVERY_INTR really isn't
    needed. If there is an error, the relevant drive will be marked as
    Faulty, and that is enough to ensure correct handling of the error. So we
    first remove MD_RECOVERY_ERR, changing some of the uses of it to
    MD_RECOVERY_INTR.

    Then we cause the attempt to remove a non-faulty device from an array to
    fail (unless recovery is impossible as the array is too degraded). Then
    when remove_and_add_spares attempts to remove the devices on which
    recovery can continue, it will fail, they will remain in place, and
    recovery will continue on them as desired.

    Issue: If we are halfway through rebuilding a spare and another drive
    fails, and a new spare is immediately available, do we want to:
    1/ complete the current rebuild, then go back and rebuild the new spare or
    2/ restart the rebuild from the start and rebuild both devices in
    parallel.

    Both options can be argued for. The code currently takes option 2 as
    a/ this requires least code change
    b/ this results in a minimally-degraded array in minimal time.

    Cc: "Eivind Sarto"
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • In some configurations, a raid6 resync can be limited by CPU speed
    (Calculating P and Q and moving data) rather than by device speed. In
    these cases there is nothing to be gained byt serialising resync of arrays
    that share a device, and doing the resync in parallel can provide benefit.
    So add a sysfs tunable to flag an array as being allowed to resync in
    parallel with other arrays that use (a different part of) the same device.

    Signed-off-by: Bernd Schubert
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bernd Schubert
     
  • This additional notification to 'array_state' is needed to allow the
    monitor application to learn about stop events via sysfs. The
    sysfs_notify("sync_action") call that comes at the end of do_md_stop()
    (via md_new_event) is insufficient since the 'sync_action' attribute has
    been removed by this point.

    (Seems like a sysfs-notify-on-removal patch is a better fix. Currently
    removal updates the event count but does not wake up waiters)

    Signed-off-by: Dan Williams
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Williams
     
  • When an array enters write pending, 'array_state' changes, so we must be
    sure to sysfs_notify.

    Also, when waiting for user-space to acknowledge 'write-pending' by
    marking the metadata as dirty, we don't want to wait for MD_CHANGE_DEVS to
    be cleared as that might not happen. So explicity test for the bits that
    we are really interested in.

    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • When performing a "recovery" or "check" pass on a RAID1 array, we read
    from each device and possible, if there is a difference or a read error,
    write back to some devices.

    We use the same 'bio' for both read and write, resetting various fields
    between the two operations.

    We forgot to reset bv_offset and bv_len however. These are often left
    unchanged, but in the case where there is an IO error one or two sectors
    into a page, they are changed.

    This results in correctable errors not being corrected properly. It does
    not result in any data corruption.

    Cc: "Fairbanks, David"
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • Last night we had scsi problems and a hardware raid unit was offlined
    during heavy i/o. While this happened we got for about 3 minutes a huge
    number messages like these

    Apr 12 03:36:07 pfs1n14 kernel: [197510.696595] raid5:md7: read error not correctable (sector 2993096568 on sdj2).

    I guess the high error rate is responsible for not scheduling other events
    - during this time the system was not pingable and in the end also other
    devices run into scsi command timeouts causing problems on these unrelated
    devices as well.

    Signed-off-by: Bernd Schubert
    Signed-off-by: Dan Williams
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bernd Schubert
     
  • Kill the trivial and rather pointless file_path wrapper around d_path.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • This patch adds a proper extern for mdp_major in include/linux/raid/md.h

    Signed-off-by: Adrian Bunk
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • It is possible to add a write-intent bitmap to an active array, or remove
    the bitmap that is there.

    When we do with the 'quiesce' the array, which causes make_request to
    block in "wait_barrier()".

    However we are sampling the value of "mddev->bitmap" before the
    wait_barrier call, and using it afterwards. This can result in using a
    bitmap structure that has been freed.

    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • The atomic_t type is 32bit but a 64bit system can have more than 2^32
    pages of virtual address space available. Without this we overflow on
    ludicrously large mappings

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • can't be used together with because they
    both define struct ustat:

    $ cat test.c
    #include
    #include
    $ gcc -c test.c
    In file included from test.c:2:
    /usr/include/linux/types.h:165: error: redefinition of 'struct ustat'

    has been reported a while ago to debian, but seems to have been
    lost in cat fighting: http://bugs.debian.org/429064

    Signed-off-by: maximilian attems
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    maximilian attems
     
  • Add support for the InstaShield IS-400 four port RS-232 PCI card.

    Signed-off-by: Ignacio García Pérez
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ignacio García Pérez
     
  • Parenthesis fix in include/asm-mips/mach-au1x00/au1000.h

    Signed-off-by: Mariusz Kozlowski
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mariusz Kozlowski
     
  • Parenthesis fix in include/asm-mips/gic.h

    Signed-off-by: Mariusz Kozlowski
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mariusz Kozlowski
     
  • This driver reads IBM Active Energy Manager energy/temperature/power
    sensors on IBM System X hardware.

    [akpm@linux-foundation.org: fix printk warnings]
    Signed-off-by: Darrick J. Wong
    Cc: "Mark M. Hoffman"
    Cc: Corey Minyard
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Darrick J. Wong