22 Mar, 2011

3 commits

  • Len Brown
     
  • The AER error information printing support is implemented in
    drivers/pci/pcie/aer/aer_print.c. So some string constants, functions
    and macros definitions can be re-used without being exported.

    The original PCIe AER error information printing function is not
    re-used directly because the overall format is quite different. And
    changing the original printing format may make some original users'
    scripts broken.

    Signed-off-by: Huang Ying
    CC: Jesse Barnes
    CC: Zhang Yanmin
    Signed-off-by: Len Brown

    Huang Ying
     
  • APEI ERST firmware interface and implementation has no multiple users
    in mind. For example, if there is four records in storage with ID: 1,
    2, 3 and 4, if two ERST readers enumerate the records via
    GET_NEXT_RECORD_ID as follow,

    reader 1 reader 2
    1
    2
    3
    4
    -1
    -1

    where -1 signals there is no more record ID.

    Reader 1 has no chance to check record 2 and 4, while reader 2 has no
    chance to check record 1 and 3. And any other GET_NEXT_RECORD_ID will
    return -1, that is, other readers will has no chance to check any
    record even they are not cleared by anyone.

    This makes raw GET_NEXT_RECORD_ID not suitable for used by multiple
    users.

    To solve the issue, an in-memory ERST record ID cache is designed and
    implemented. When enumerating record ID, the ID returned by
    GET_NEXT_RECORD_ID is added into cache in addition to be returned to
    caller. So other readers can check the cache to get all record ID
    available.

    Signed-off-by: Huang Ying
    Reviewed-by: Andi Kleen
    Signed-off-by: Len Brown

    Huang Ying
     

19 Mar, 2011

1 commit


03 Mar, 2011

3 commits


01 Mar, 2011

3 commits

  • Several ACPI drivers fail to build if CONFIG_NET is unset, because
    they refer to things depending on CONFIG_THERMAL that in turn depends
    on CONFIG_NET. However, CONFIG_THERMAL doesn't really need to depend
    on CONFIG_NET, because the only part of it requiring CONFIG_NET is
    the netlink interface in thermal_sys.c.

    Put the netlink interface in thermal_sys.c under #ifdef CONFIG_NET
    and remove the dependency of CONFIG_THERMAL on CONFIG_NET from
    drivers/thermal/Kconfig.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Randy Dunlap
    Cc: Ingo Molnar
    Cc: Len Brown
    Cc: Stephen Rothwell
    Cc: Luming Yu
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
    drm: fix unsigned vs signed comparison issue in modeset ctl ioctl.
    drm/nv50-nvc0: make sure vma is definitely unmapped when destroying bo

    Linus Torvalds
     
  • Commit e2cda3226481 ("thp: add pmd mangling generic functions") replaced
    some macros in with inline functions.

    If the functions are to be defined (not all architectures need them)
    then struct vm_area_struct must be defined first. So include
    .

    Fixes a build failure seen in Debian:

    CC [M] drivers/media/dvb/mantis/mantis_pci.o
    In file included from arch/arm/include/asm/pgtable.h:460,
    from drivers/media/dvb/mantis/mantis_pci.c:25:
    include/asm-generic/pgtable.h: In function 'ptep_test_and_clear_young':
    include/asm-generic/pgtable.h:29: error: dereferencing pointer to incomplete type

    Signed-off-by: Ben Hutchings
    Signed-off-by: Linus Torvalds

    Ben Hutchings
     

28 Feb, 2011

1 commit


26 Feb, 2011

3 commits


25 Feb, 2011

5 commits


24 Feb, 2011

4 commits

  • There are two cases when we call flush_disk.
    In one, the device has disappeared (check_disk_change) so any
    data will hold becomes irrelevant.
    In the oter, the device has changed size (check_disk_size_change)
    so data we hold may be irrelevant.

    In both cases it makes sense to discard any 'clean' buffers,
    so they will be read back from the device if needed.

    In the former case it makes sense to discard 'dirty' buffers
    as there will never be anywhere safe to write the data. In the
    second case it *does*not* make sense to discard dirty buffers
    as that will lead to file system corruption when you simply enlarge
    the containing devices.

    flush_disk calls __invalidate_devices.
    __invalidate_device calls both invalidate_inodes and invalidate_bdev.

    invalidate_inodes *does* discard I_DIRTY inodes and this does lead
    to fs corruption.

    invalidate_bev *does*not* discard dirty pages, but I don't really care
    about that at present.

    So this patch adds a flag to __invalidate_device (calling it
    __invalidate_device2) to indicate whether dirty buffers should be
    killed, and this is passed to invalidate_inodes which can choose to
    skip dirty inodes.

    flusk_disk then passes true from check_disk_change and false from
    check_disk_size_change.

    dm avoids tripping over this problem by calling i_size_write directly
    rathher than using check_disk_size_change.

    md does use check_disk_size_change and so is affected.

    This regression was introduced by commit 608aeef17a which causes
    check_disk_size_change to call flush_disk, so it is suitable for any
    kernel since 2.6.27.

    Cc: stable@kernel.org
    Acked-by: Jeff Moyer
    Cc: Andrew Patterson
    Cc: Jens Axboe
    Signed-off-by: NeilBrown

    NeilBrown
     
  • Michael Leun reported that running parallel opens on a fuse filesystem
    can trigger a "kernel BUG at mm/truncate.c:475"

    Gurudas Pai reported the same bug on NFS.

    The reason is, unmap_mapping_range() is not prepared for more than
    one concurrent invocation per inode. For example:

    thread1: going through a big range, stops in the middle of a vma and
    stores the restart address in vm_truncate_count.

    thread2: comes in with a small (e.g. single page) unmap request on
    the same vma, somewhere before restart_address, finds that the
    vma was already unmapped up to the restart address and happily
    returns without doing anything.

    Another scenario would be two big unmap requests, both having to
    restart the unmapping and each one setting vm_truncate_count to its
    own value. This could go on forever without any of them being able to
    finish.

    Truncate and hole punching already serialize with i_mutex. Other
    callers of unmap_mapping_range() do not, and it's difficult to get
    i_mutex protection for all callers. In particular ->d_revalidate(),
    which calls invalidate_inode_pages2_range() in fuse, may be called
    with or without i_mutex.

    This patch adds a new mutex to 'struct address_space' to prevent
    running multiple concurrent unmap_mapping_range() on the same mapping.

    [ We'll hopefully get rid of all this with the upcoming mm
    preemptibility series by Peter Zijlstra, the "mm: Remove i_mmap_mutex
    lockbreak" patch in particular. But that is for 2.6.39 ]

    Signed-off-by: Miklos Szeredi
    Reported-by: Michael Leun
    Reported-by: Gurudas Pai
    Tested-by: Gurudas Pai
    Acked-by: Hugh Dickins
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (33 commits)
    Added support for usb ethernet (0x0fe6, 0x9700)
    r8169: fix RTL8168DP power off issue.
    r8169: correct settings of rtl8102e.
    r8169: fix incorrect args to oob notify.
    DM9000B: Fix PHY power for network down/up
    DM9000B: Fix reg_save after spin_lock in dm9000_timeout
    net_sched: long word align struct qdisc_skb_cb data
    sfc: lower stack usage in efx_ethtool_self_test
    bridge: Use IPv6 link-local address for multicast listener queries
    bridge: Fix MLD queries' ethernet source address
    bridge: Allow mcast snooping for transient link local addresses too
    ipv6: Add IPv6 multicast address flag defines
    bridge: Add missing ntohs()s for MLDv2 report parsing
    bridge: Fix IPv6 multicast snooping by correcting offset in MLDv2 report
    bridge: Fix IPv6 multicast snooping by storing correct protocol type
    p54pci: update receive dma buffers before and after processing
    fix cfg80211_wext_siwfreq lock ordering...
    rt2x00: Fix WPA TKIP Michael MIC failures.
    ath5k: Fix fast channel switching
    tcp: undo_retrans counter fixes
    ...

    Linus Torvalds
     
  • netem_skb_cb() does :

    return (struct netem_skb_cb *)qdisc_skb_cb(skb)->data;

    Unfortunatly struct qdisc_skb_cb data is not long word aligned, so
    access to psched_time_t time_to_send uses a non aligned access.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

23 Feb, 2011

3 commits


22 Feb, 2011

1 commit

  • We force particular alignment when we generate attribute structures
    when generation MODULE_VERSION() data and we need to make sure that
    this alignment is followed when we iterate over these structures,
    otherwise we may crash on platforms whose natural alignment is not
    sizeof(void *), such as m68k.

    Reported-by: Geert Uytterhoeven
    Signed-off-by: Dmitry Torokhov
    [ There are more issues here, but the fixes are incredibly ugly - Linus ]
    Signed-off-by: Linus Torvalds

    Dmitry Torokhov
     

20 Feb, 2011

3 commits


19 Feb, 2011

3 commits


18 Feb, 2011

2 commits

  • This patch re-enables UIE timer/polling emulation for rtc devices
    that do not support alarm irqs.

    CC: Uwe Kleine-König
    CC: Thomas Gleixner
    Reported-by: Uwe Kleine-König
    Tested-by: Uwe Kleine-König
    Signed-off-by: John Stultz

    John Stultz
     
  • Uwe pointed out that my alarm based UIE emulation is not sufficient
    to replace the older timer/polling based UIE emulation on devices
    where there is no alarm irq. This causes rtc devices without alarms
    to return -EINVAL to UIE ioctls. The fix is to re-instate the old
    timer/polling method for devices without alarm irqs.

    This patch reverts the following commits:
    042620a018afcfba1d678062b62e46 - Remove UIE emulation
    1daeddd5962acad1bea55e524fc0fa - Cleanup removed UIE emulation declaration
    b5cc8ca1c9c3a37eaddf709b2fd3e1 - Remove Kconfig symbol for UIE emulation

    The emulation mode will still need to be wired-in with a following
    patch before it will work.

    CC: Uwe Kleine-König
    CC: Thomas Gleixner
    Reported-by: Uwe Kleine-König
    Signed-off-by: John Stultz

    John Stultz
     

17 Feb, 2011

3 commits

  • Assigning a socket in timewait state to skb->sk can trigger
    kernel oops, e.g. in nfnetlink_log, which does:

    if (skb->sk) {
    read_lock_bh(&skb->sk->sk_callback_lock);
    if (skb->sk->sk_socket && skb->sk->sk_socket->file) ...

    in the timewait case, accessing sk->sk_callback_lock and sk->sk_socket
    is invalid.

    Either all of these spots will need to add a test for sk->sk_state != TCP_TIME_WAIT,
    or xt_TPROXY must not assign a timewait socket to skb->sk.

    This does the latter.

    If a TW socket is found, assign the tproxy nfmark, but skip the skb->sk assignment,
    thus mimicking behaviour of a '-m socket .. -j MARK/ACCEPT' re-routing rule.

    The 'SYN to TW socket' case is left unchanged -- we try to redirect to the
    listener socket.

    Cc: Balazs Scheidler
    Cc: KOVACS Krisztian
    Signed-off-by: Florian Westphal
    Signed-off-by: Patrick McHardy

    Florian Westphal
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
    [SCSI] qla2xxx: Return DID_NO_CONNECT when FC device is lost.
    [SCSI] mptfusion: Bump version 03.04.18
    [SCSI] mptfusion: Fix Incorrect return value in mptscsih_dev_reset
    [SCSI] mptfusion: mptctl_release is required in mptctl.c
    [SCSI] target: fix use after free detected by SLUB poison
    [SCSI] target: Remove procfs based target_core_mib.c code
    [SCSI] target: Fix SCF_SCSI_CONTROL_SG_IO_CDB breakage
    [SCSI] target: Fix top-level configfs_subsystem default_group shutdown breakage
    [SCSI] target: fixed missing lock drop in error path
    [SCSI] target: Fix demo-mode MappedLUN shutdown UA/PR breakage
    [SCSI] target/iblock: Fix failed bd claim NULL pointer dereference
    [SCSI] target: iblock/pscsi claim checking for NULL instead of IS_ERR
    [SCSI] scsi_debug: Fix 32-bit overflow in do_device_access causing memory corruption
    [SCSI] qla2xxx: Change from irq to irqsave with host_lock
    [SCSI] qla2xxx: Fix race that could hang kthread_stop()

    Linus Torvalds
     
  • There are two spellings in use for 'freeze' + 'able' - 'freezable' and
    'freezeable'. The former is the more prominent one. The latter is
    mostly used by workqueue and in a few other odd places. Unify the
    spelling to 'freezable'.

    Signed-off-by: Tejun Heo
    Reported-by: Alan Stern
    Acked-by: "Rafael J. Wysocki"
    Acked-by: Greg Kroah-Hartman
    Acked-by: Dmitry Torokhov
    Cc: David Woodhouse
    Cc: Alex Dubov
    Cc: "David S. Miller"
    Cc: Steven Whitehouse

    Tejun Heo
     

16 Feb, 2011

2 commits