31 Aug, 2007

40 commits

  • Mariusz Kozlowski reported lockdep's warning:

    > =================================
    > [ INFO: inconsistent lock state ]
    > 2.6.23-rc2-mm1 #7
    > ---------------------------------
    > inconsistent {in-hardirq-W} -> {hardirq-on-W} usage.
    > ifconfig/5492 [HC0[0]:SC0[0]:HE1:SE1] takes:
    > (&tp->lock){+...}, at: [] rtl8139_interrupt+0x27/0x46b [8139too]
    > {in-hardirq-W} state was registered at:
    > [] __lock_acquire+0x949/0x11ac
    > [] lock_acquire+0x99/0xb2
    > [] _spin_lock+0x35/0x42
    > [] rtl8139_interrupt+0x27/0x46b [8139too]
    > [] handle_IRQ_event+0x28/0x59
    > [] handle_level_irq+0xad/0x10b
    > [] do_IRQ+0x93/0xd0
    > [] common_interrupt+0x2e/0x34
    ...
    > other info that might help us debug this:
    > 1 lock held by ifconfig/5492:
    > #0: (rtnl_mutex){--..}, at: [] mutex_lock+0x1c/0x1f
    >
    > stack backtrace:
    ...
    > [] _spin_lock+0x35/0x42
    > [] rtl8139_interrupt+0x27/0x46b [8139too]
    > [] free_irq+0x11b/0x146
    > [] rtl8139_close+0x8a/0x14a [8139too]
    > [] dev_close+0x57/0x74
    ...

    This shows that a driver's irq handler was running both in hard interrupt
    and process contexts with irqs enabled. The latter was done during
    free_irq() call and was possible only with CONFIG_DEBUG_SHIRQ enabled.
    This was fixed by another patch.

    But similar problem is possible with request_irq(): any locks taken from
    irq handler could be vulnerable - especially with soft interrupts. This
    patch fixes it by disabling local interrupts during handler's run. (It
    seems, disabling softirqs should be enough, but it needs more checking
    on possible races or other special cases).

    Reported-by: Mariusz Kozlowski
    Signed-off-by: Jarek Poplawski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jarek Poplawski
     
  • This will avoid a possible fault in ecryptfs_sync_page().

    In the function, eCryptfs calls sync_page() method of a lower filesystem
    without checking its existence. However, there are many filesystems that
    don't have this method including network filesystems such as NFS, AFS, and
    so forth. They may fail when an eCryptfs page is waiting for lock.

    Signed-off-by: Ryusuke Konishi
    Acked-by: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi
     
  • Fix cut 'n paste bug in Atmel SPI driver.

    Signed-off-by: Andrew Victor
    Acked-by: David Brownell
    Acked-by: Haavard Skinnemoen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Victor
     
  • This is triggered if PCI && !HOTPLUG.

    MODPOST vmlinux.o
    WARNING: vmlinux.o(.data+0xc910): Section mismatch: reference to .init.text:pci_ite887x_init (between 'pci_serial_quirks' and 'serial_pci_tbl')

    Signed-off-by: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ralf Baechle
     
  • The IOC3 is a multifunction device but not in sense of the PCI
    specification. Currently its ethernet and serial functionality are
    supported by two separate drivers authored and maintained by different
    people, so MAINTAINERS should reflect that.

    Cc: Patrick Gefre
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ralf Baechle
     
  • Dependencies of CONFIG_SUSPEND and CONFIG_HIBERNATION introduced by commit
    296699de6bdc717189a331ab6bbe90e05c94db06 "Introduce CONFIG_SUSPEND for
    suspend-to-Ram and standby" are incorrect, as they don't cover the facts that
    (1) not all architectures support suspend and (2) SMP hibernation is only
    possible on X86 and PPC64 (if CONFIG_PPC64_SWSUSP is set).

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Spotted by Marcin Kowalczyk .

    sys_setpgid(child) fails if the child was forked by sub-thread.

    Fix the "is it our child" check. The previous commit
    ee0acf90d320c29916ba8c5c1b2e908d81f5057d was not complete.

    (this patch asks for the new same_thread_group() helper, but mainline doesn't
    have it yet).

    Signed-off-by: Oleg Nesterov
    Acked-by: Roland McGrath
    Cc:
    Tested-by: "Marcin 'Qrczak' Kowalczyk"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Do not BUG() if we cannot register a slab with sysfs. Just print an error.
    The only consequence of not registering is that the slab cache is not
    visible via /sys/slab. A BUG() may not be visible that early during boot
    and we have had multiple issues here already.

    Signed-off-by: Christoph Lameter
    Acked-by: David S. Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Correct the name of the spi_txx9 driver (and their in-tree user)
    instead of MODULE_ALIAS workaround. This would be preferable in the
    long term.

    Signed-off-by: Atsushi Nemoto
    Acked-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Atsushi Nemoto
     
  • Update various SPI drivers so they properly support

    - coldplug through "modprobe $(cat /sys/devices/.../modalias)"

    - hotplug through "modprobe $(MODALIAS)"

    The basic rule for platform, SPI, and (new style) I2C drivers is just
    to make sure that modprobing the driver name works. In this case, all
    the relevant drivers are platform drivers, and this patch either

    (a) Changes the driver name, if no in-tree code would break;
    this is simpler and thus preferable in the long term.

    (b) Adds MODULE_ALIAS directives, when in-tree platforms declare
    devices using the current driver name; less desirable.

    Most systems will link SPI controller drivers statically, but
    there's no point in being needlessly broken.

    Signed-off-by: David Brownell
    Cc: Jean Delvare
    Acked-by: Andrei Konovalov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • taskstats.ac_exitcode is assigned to task_struct.exit_code in bacct_add_tsk()
    through the following kernel function calls:

    do_exit()
    taskstats_exit()
    fill_pid()
    bacct_add_tsk()

    The problem is that in do_exit(), task_struct.exit_code is set to 'code' only
    after taskstats_exit() has been called. So we need to move the assignment
    before taskstats_exit().

    Signed-off-by: Jonathan Lim
    Cc: Balbir Singh
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jonathan Lim
     
  • We better select a font when the newport driver is a module or the user
    experience might suffer.

    Signed-off-by: Ralf Baechle
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ralf Baechle
     
  • Fix possible NULL pointer dereference when freeing blocks in case table of
    free space is used. Also fix handling of the case when we need to move
    extent from one block to another one to make space for indirect extent.
    BTW: Nobody seem to have ever used this code.

    Signed-off-by: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kara
     
  • If UDF superblock is incorrect, we can fail to find a table of free /
    allocated space and consequently Oops. Handle this situation more
    gracefully by ignoring the broken UDF partition.

    Signed-off-by: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kara
     
  • In migration fallback path, write_page() or lock_page() will be called.
    This causes sleep with holding rcu_read_lock().
    For avoding that, just do rcu_lock if the page is Anon.(this is enough.)

    Signed-off-by: KAMEZAWA Hiroyuki
    Acked-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • Stop UML crashing when trying to dump a process core on x86_64. This is the
    minimal fix to stop the crash - more things are broken here, and patches are
    forthcoming.

    The immediate thing to do is define ELF_CORE_COPY_REGS and
    ELF_CORE_COPY_FPREGS. Defining ELF_CORE_COPY_FPREGS allows dump_fpu to go
    away. It is defined in terms of save_fp_registers, so that needs to be added.

    Signed-off-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • Fix a class of bugs in the UML linker scripts which caused section boundary
    variables to sometimes not line up with their sections.

    Signed-off-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • Don't try to free memory which we didn't allocate.

    Acked-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • This patch got appied twice.

    Cc: Ryusuke Konishi
    Cc: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Some compilers (especially older gcc releases) may skip inlining
    sometimes which will lead to link failures. Force the inlining of
    keyfunctions in slub_def.h to avoid these issues.

    Signed-off-by: Christoph Lameter
    Acked-by: Jan Dittmer
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
    [SPARC64]: Fix several bugs in MSI handling.
    [SPARC64]: Fix type and constant sizes wrt. sun4u IMAP/ICLR handling.

    Linus Torvalds
     
  • * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
    [PKTGEN]: Remove write-only variable.
    [NETFILTER]: xt_tcpudp: fix wrong struct in udp_checkentry
    [NET_SCHED] sch_prio.c: remove duplicate call of tc_classify()
    [BRIDGE]: Fix OOPS when bridging device without ethtool.
    [BRIDGE]: Packets leaking out of disabled/blocked ports.
    [TCP]: Allow minimum RTO to be configurable via routing metrics.
    SCTP: Fix to handle invalid parameter length correctly
    SCTP: Abort on COOKIE-ECHO if backlog is exceeded.
    SCTP: Correctly disable listening when backlog is 0.
    SCTP: Do not retransmit chunks that are newer then rtt.
    SCTP: Uncomfirmed transports can't become Inactive
    SCTP: Pick the correct port when binding to 0.
    SCTP: Use net_ratelimit to suppress error messages print too fast
    SCTP: Fix to encode PROTOCOL VIOLATION error cause correctly
    SCTP: Fix sctp_addto_chunk() to add pad with correct length
    SCTP: Assign stream sequence numbers to the entire message
    SCTP: properly clean up fragment and ordering queues during FWD-TSN.
    [PKTGEN]: Fix multiqueue oops.
    [BNX2]: Add write posting comment.
    [BNX2]: Use msleep().

    Linus Torvalds
     
  • 1) sun4{u,v}_build_msi() have improper return value handling.

    We should always return negative error codes, instead of
    using the magic value "0" which could in fact be a valid
    MSI number.

    2) sun4{u,v}_build_msi() should return -ENOMEM instead of
    calling prom_prom() halt with kzalloc() of the interrupt
    data fails.

    3) We 'remembered' the MSI number using a singleton in the
    struct device archdata area, this doesn't work for MSI-X
    which can cause multiple MSIs assosciated with one device.

    Delete that archdata member, and instead store the MSI
    number in the IRQ chip data area.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Sometimes we were using 32-bit values and the top bits were
    getting inadvertantly chopped off. This will matter for the
    forthcoming Fire controller MSI support.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • The pktgen_thread.pid is set to current->pid and is never used
    after this. So remove this at all.

    Found during isolating the explicit pid/tgid usage.

    Signed-off-by: Pavel Emelyanov
    Acked-by: Sukadev Bhattiprolu
    Signed-off-by: David S. Miller

    Pavel Emelyanov
     
  • It doesn't seem to have any effect on the x86 architecture but it does
    have effect on the Axis CRIS architecture.

    Signed-off-by: Jesper Bengtsson
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Jesper Bengtsson
     
  • When CONFIG_NET_CLS_ACT is enabled, tc_classify() is called twice in
    prio_classify(). This causes "interesting" behaviour: with the setup
    below, packets are duplicated, sent twice to ifb0, and then loop in and
    out of ifb0.

    The patch uses the previously calculated return value in the switch,
    which is probably what Patrick had in mind in commit
    bdba91ec70fb5ccbdeb1c7068319adc6ea9e1a7d -- maybe Patrick can
    double-check this?

    -- example setup --
    ifconfig ifb0 up
    tc qdisc add dev ifb0 root netem delay 2s
    tc qdisc add dev $ETH root handle 1: prio
    tc filter add dev $ETH parent 1: protocol ip prio 10 u32 \
    match ip dst 172.24.110.6/32 flowid 1:1 \
    action mirred egress redirect dev ifb0
    ping -c1 172.24.110.6

    Signed-off-by: Lucas Nussbaum
    Signed-off-by: David S. Miller

    Lucas Nussbaum
     
  • acpi_get_devices() returns success if it did not find any device.
    We have to check for this case.

    Signed-off-by: Alexey Starikovskiy
    Tested-by: Daniel Ritz
    Tested-by: Luca
    Signed-off-by: Linus Torvalds

    Alexey Starikovskiy
     
  • Bridge code calls ethtool to get speed. The conversion to using
    only ethtool_ops broke the case of devices without ethtool_ops.
    This is a new regression in 2.6.23.

    Rearranged the switch to a logical order, and use gcc initializer.

    Ps: speed should have been part of the network device structure from
    the start rather than burying it in ethtool.

    Signed-off-by: Stephen Hemminger
    Acked-by: Matthew Wilcox
    Signed-off-by: David S. Miller

    Stephen Hemminger
     
  • This patch fixes some packet leakage in bridge. The bridging code was
    allowing forward table entries to be generated even if a device was
    being blocked. The fix is to not add forwarding database entries
    unless the port is active.

    The bug arose as part of the conversion to processing STP frames
    through normal receive path (in 2.6.17).

    Signed-off-by: Stephen Hemminger
    Acked-by: John W. Linville
    Signed-off-by: David S. Miller

    Stephen Hemminger
     
  • David S. Miller
     
  • Cell phone networks do link layer retransmissions and other
    things that cause unnecessary timeout retransmits. So allow
    the minimum RTO to be inflated per-route to deal with this.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6:
    SELinux: clear parent death signal on SID transitions

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: psmouse - make dummy touchkit_ps2_detect() static
    Input: gscps2 - convert to use kzalloc
    Input: iforce - fix 'unused variable' warning
    Input: i8042 - fix retrun value of i8042_aux_test_irq
    Input: gpio_keys - remove duplicate includes

    Linus Torvalds
     
  • * master.kernel.org:/home/rmk/linux-2.6-arm:
    [ARM] 4561/1: i.MX/MX1 GPIO parenthes omission and input setup fix
    [ARM] 4557/1: Fix PXA irq gpio initialization
    [ARM] 4551/1: s3c24xx: fix wrong virtual address offsets
    [ARM] 4552/1: i.MX/MX1 GPIO output setup fix
    [ARM] 4553/1: ARM at91: define FIQ_START
    [ARM] 4554/1: replace consistent_sync() with flush_ioremap_region()
    ARM: OMAP: Enable serial idling and wakeup features
    ARM: OMAP2: Force APLLs always active
    ARM: OMAP: H3 workqueue fixes
    ARM: OMAP: OSK led fixes
    ARM: OMAP: fix OMAP1 dmtimer build warning
    ARM: OMAP: Fix 32k timer unsupported one-shot mode

    Linus Torvalds
     
  • Alexey Dobriyan reports that maxcpus=1 is still broken in 2.6.23-rc4:
    if CONFIG_HOTPLUG_CPU is not set, x86_64 bootup oopses in show_stat() -
    for_each_possible_cpu accesses a per-cpu area which was never set up.

    Alexey identified commit 61ec7567db103d537329b0db9a887db570431ff4
    (ACPI: boot correctly with "nosmp" or "maxcpus=0") as the origin;
    but it's not really to blame, just exposes a bug in 2.6.23-rc1's commit
    8b3b295502444340dd0701855ac422fbf32e161d (Especially when !CONFIG_HOTPLUG_CPU,
    avoid needlessy allocating resources for CPUs that can never become available).

    rc1's test for max_cpus < 2 in start_kernel() wasn't working because
    max_cpus was still NR_CPUS at that point: until rc4 moved the maxcpus
    parsing earlier. Now it sets cpu_possible_map to 1 before allocating
    all possible per-cpu areas; then smp_init() expands cpu_possible_map
    to cpu_present_map (0xf in my case) later on.

    rc1's commit has good intentions, but expects cpu_present_map to be
    limited by maxcpus, which is only the case on i386. cpus_and(possible,
    possible,present) might be good, but needs an audit of cpu_present_map
    uses - there may well be assumptions that any cpu present is possible.

    So stay safe for now and just revert those #ifndef CONFIG_HOTPLUG_CPU
    optimizations in rc1's commit.

    Signed-off-by: Hugh Dickins
    Cc: Alexey Dobriyan
    Cc: Len Brown
    Cc: Andrew Morton
    Cc: Jan Beulich
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • Clear parent death signal on SID transitions to prevent unauthorized
    signaling between SIDs.

    Signed-off-by: Stephen Smalley
    Acked-by: Eric Paris
    Signed-off-by: James Morris

    Stephen Smalley
     
  • If an INIT with invalid parameter length look like this:
    Parameter Type : 1
    Parameter Length: 800
    and not contain any payload, SCTP will ignore this parameter and send
    back a INIT-ACK.
    This patch is fix to handle this invalid parameter length correctly.

    Signed-off-by: Wei Yongjun
    Signed-off-by: Vlad Yasevich

    Wei Yongjun
     
  • Currently we abort on the INIT chunk we our backlog is currenlty
    exceeded. Delay this about untill COOKIE-ECHO to give the user
    time to accept the socket. Also, make sure that we treat
    sk_max_backlog of 0 as no connections allowed.

    Signed-off-by: Vlad Yasevich

    Vlad Yasevich
     
  • Signed-off-by: Vlad Yasevich

    Vlad Yasevich