12 May, 2011

1 commit

  • Since suspend, resume and shutdown operations in struct sysdev_class
    and struct sysdev_driver are not used any more, remove them. Also
    drop sysdev_suspend(), sysdev_resume() and sysdev_shutdown() used
    for executing those operations and modify all of their users
    accordingly. This reduces kernel code size quite a bit and reduces
    its complexity.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Greg Kroah-Hartman

    Rafael J. Wysocki
     

24 Apr, 2011

4 commits

  • * dcache-cleanup:
    vfs: get rid of insane dentry hashing rules

    Linus Torvalds
     
  • NVIDIA mcp65 familiy of controllers cause command timeouts when DIPM
    is used. Implement ATA_FLAG_NO_DIPM and apply it.

    This problem was reported by Stefan Bader in the following thread.

    http://thread.gmane.org/gmane.linux.ide/48841

    stable: applicable to 2.6.37 and 38.

    Signed-off-by: Tejun Heo
    Reported-by: Stefan Bader
    Cc: stable@kernel.org
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • ATA_DFLAG_{H|D}IPM flags are no longer used. Kill them.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • The dentry hashing rules have been really quite complicated for a long
    while, in odd ways. That made functions like __d_drop() very fragile
    and non-obvious.

    In particular, whether a dentry was hashed or not was indicated with an
    explicit DCACHE_UNHASHED bit. That's despite the fact that the hash
    abstraction that the dentries use actually have a 'is this entry hashed
    or not' model (which is a simple test of the 'pprev' pointer).

    The reason that was done is because we used the normal 'is this entry
    unhashed' model to mark whether the dentry had _ever_ been hashed in the
    dentry hash tables, and that logic goes back many years (commit
    b3423415fbc2: "dcache: avoid RCU for never-hashed dentries").

    That, in turn, meant that __d_drop had totally different unhashing logic
    for the dentry hash table case and for the anonymous dcache case,
    because in order to use the "is this dentry hashed" logic as a flag for
    whether it had ever been on the RCU hash table, we had to unhash such a
    dentry differently so that we'd never think that it wasn't 'unhashed'
    and wouldn't be free'd correctly.

    That's just insane. It made the logic really hard to follow, when there
    were two different kinds of "unhashed" states, and one of them (the one
    that used "list_bl_unhashed()") really had nothing at all to do with
    being unhashed per se, but with a very subtle lifetime rule instead.

    So turn all of it around, and make it logical.

    Instead of having a DENTRY_UNHASHED bit in d_flags to indicate whether
    the dentry is on the hash chains or not, use the hash chain unhashed
    logic for that. Suddenly "d_unhashed()" just uses "list_bl_unhashed()",
    and everything makes sense.

    And for the lifetime rule, just use an explicit DENTRY_RCUACCEES bit.
    If we ever insert the dentry into the dentry hash table so that it is
    visible to RCU lookup, we mark it DENTRY_RCUACCESS to show that it now
    needs the RCU lifetime rules. Now suddently that test at dentry free
    time makes sense too.

    And because unhashing now is sane and doesn't depend on where the dentry
    got unhashed from (because the dentry hash chain details doesn't have
    some subtle side effects), we can re-unify the __d_drop() logic and use
    common code for the unhashing.

    Also fix one more open-coded hash chain bit_spin_lock() that I missed in
    the previous chain locking cleanup commit.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

23 Apr, 2011

1 commit

  • Right now all RCU walks fall back to reference walk when CONFIG_SECURITY
    is enabled, even though just the standard capability module is active.
    This is because security_inode_exec_permission unconditionally fails
    RCU walks.

    Move this decision to the low level security module. This requires
    passing the RCU flags down the security hook. This way at least
    the capability module and a few easy cases in selinux/smack work
    with RCU walks with CONFIG_SECURITY=y

    Signed-off-by: Andi Kleen
    Acked-by: Eric Paris
    Signed-off-by: Linus Torvalds

    Andi Kleen
     

21 Apr, 2011

1 commit

  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    block: Remove the extra check in queue_requests_store
    block, blk-sysfs: Fix an err return path in blk_register_queue()
    block: remove stale kerneldoc member from __blk_run_queue()
    block: get rid of QUEUE_FLAG_REENTER
    cfq-iosched: read_lock() does not always imply rcu_read_lock()
    block: kill blk_flush_plug_list() export

    Linus Torvalds
     

20 Apr, 2011

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (51 commits)
    netfilter: ipset: Fix the order of listing of sets
    ip6_pol_route panic: Do not allow VLAN on loopback
    bnx2x: Fix port identification problem
    r8169: add Realtek as maintainer.
    ip: ip_options_compile() resilient to NULL skb route
    bna: fix memory leak during RX path cleanup
    bna: fix for clean fw re-initialization
    usbnet: Fix up 'FLAG_POINTTOPOINT' and 'FLAG_MULTI_PACKET' overlaps.
    iwlegacy: fix tx_power initialization
    Revert "tcp: disallow bind() to reuse addr/port"
    qlcnic: limit skb frags for non tso packet
    net: can: mscan: fix build breakage in mpc5xxx_can
    netfilter: ipset: set match and SET target fixes
    netfilter: ipset: bitmap:ip,mac type requires "src" for MAC
    sctp: fix oops while removed transport still using as retran path
    sctp: fix oops when updating retransmit path with DEBUG on
    net: Disable NETIF_F_TSO_ECN when TSO is disabled
    net: Disable all TSO features when SG is disabled
    sfc: Use rmb() to ensure reads occur in order
    ieee802154: Remove hacked CFLAGS in net/ieee802154/Makefile
    ...

    Linus Torvalds
     
  • …l/git/tip/linux-2.6-tip

    * 'timer-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    RTC: rtc-omap: Fix a leak of the IRQ during init failure
    posix clocks: Replace mutex with reader/writer semaphore

    Linus Torvalds
     

19 Apr, 2011

5 commits

  • We are currently using this flag to check whether it's safe
    to call into ->request_fn(). If it is set, we punt to kblockd.
    But we get a lot of false positives and excessive punts to
    kblockd, which hurts performance.

    The only real abuser of this infrastructure is SCSI. So export
    the async queue run and convert SCSI over to use that. There's
    room for improvement in that SCSI need not always use the async
    call, but this fixes our performance issue and they can fix that
    up in due time.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: xen-kbdfront - fix mouse getting stuck after save/restore
    Input: estimate number of events per packet
    Input: evdev - indicate buffer overrun with SYN_DROPPED
    Input: document event types and codes and their intended use
    Input: add KEY_IMAGES specifically for AL Image Browser
    Input: twl4030_keypad - fix potential NULL dereference in twl4030_kp_probe()
    Input: h3600_ts - fix error handling at connect
    Input: twl4030_keypad - avoid potential NULL-pointer dereference

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    block: add blk_run_queue_async
    block: blk_delay_queue() should use kblockd workqueue
    md: fix up raid1/raid10 unplugging.
    md: incorporate new plugging into raid5.
    md: provide generic support for handling unplug callbacks.
    md - remove old plugging code.
    md/dm - remove remains of plug_fn callback.
    md: use new plugging interface for RAID IO.
    block: drop queue lock before calling __blk_run_queue() for kblockd punt
    Revert "block: add callback function for unplug notification"
    block: Enhance new plugging support to support general callbacks

    Linus Torvalds
     
  • next_pidmap() just quietly accepted whatever 'last' pid that was passed
    in, which is not all that safe when one of the users is /proc.

    Admittedly the proc code should do some sanity checking on the range
    (and that will be the next commit), but that doesn't mean that the
    helper functions should just do that pidmap pointer arithmetic without
    checking the range of its arguments.

    So clamp 'last' to PID_MAX_LIMIT. The fact that we then do "last+1"
    doesn't really matter, the for-loop does check against the end of the
    pidmap array properly (it's only the actual pointer arithmetic overflow
    case we need to worry about, and going one bit beyond isn't going to
    overflow).

    [ Use PID_MAX_LIMIT rather than pid_max as per Eric Biederman ]

    Reported-by: Tavis Ormandy
    Analyzed-by: Robert Święcki
    Cc: Eric W. Biederman
    Cc: Pavel Emelyanov
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Calculate a default based on the number of ABS axes, REL axes,
    and MT slots for the device during input device registration.

    Signed-off-by: Jeff Brown
    Reviewed-by: Henrik Rydberg
    Signed-off-by: Dmitry Torokhov

    Jeff Brown
     

18 Apr, 2011

5 commits

  • Instead of overloading __blk_run_queue to force an offload to kblockd
    add a new blk_run_queue_async helper to do it explicitly. I've kept
    the blk_queue_stopped check for now, but I suspect it's not needed
    as the check we do when the workqueue items runs should be enough.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     
  • A dynamic posix clock is protected from asynchronous removal by a mutex.
    However, using a mutex has the unwanted effect that a long running clock
    operation in one process will unnecessarily block other processes.

    For example, one process might call read() to get an external time stamp
    coming in at one pulse per second. A second process calling clock_gettime
    would have to wait for almost a whole second.

    This patch fixes the issue by using a reader/writer semaphore instead of
    a mutex.

    Signed-off-by: Richard Cochran
    Cc: John Stultz
    Link: http://lkml.kernel.org/r/%3C20110330132421.GA31771%40riccoc20.at.omicron.at%3E
    Signed-off-by: Thomas Gleixner

    Richard Cochran
     
  • Now that unplugging is done differently, the unplug_fn callback is
    never called, so it can be completely discarded.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • MD can't use this since it really requires us to be able to
    keep more than a single piece of state for the unplug. Commit
    048c9374 added the required support for MD, so get rid of this
    now unused code.

    This reverts commit f75664570d8b75469cc468f23c2b27220984983b.

    Conflicts:

    block/blk-core.c

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • md/raid requires an unplug callback, but as it does not uses
    requests the current code cannot provide one.

    So allow arbitrary callbacks to be attached to the blk_plug.

    Signed-off-by: NeilBrown
    Signed-off-by: Jens Axboe

    NeilBrown
     

17 Apr, 2011

2 commits

  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    block: make unplug timer trace event correspond to the schedule() unplug
    block: let io_schedule() flush the plug inline

    Linus Torvalds
     
  • …linus', 'timer-fixes-for-linus' and 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

    * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    futex: Set FLAGS_HAS_TIMEOUT during futex_wait restart setup

    * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    perf_event: Fix cgrp event scheduling bug in perf_enable_on_exec()
    perf: Fix a build error with some GCC versions

    * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    sched: Fix erroneous all_pinned logic
    sched: Fix sched-domain avg_load calculation

    * 'timer-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    RTC: rtc-mrst: follow on to the change of rtc_device_register()
    RTC: add missing "return 0" in new alarm func for rtc-bfin.c
    RTC: Fix s3c compile error due to missing s3c_rtc_setpie
    RTC: Fix early irqs caused by calling rtc_set_alarm too early

    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86, amd: Disable GartTlbWlkErr when BIOS forgets it
    x86, NUMA: Fix fakenuma boot failure
    x86/mrst: Fix boot crash caused by incorrect pin to irq mapping
    x86/ce4100: Add reg property to bridges

    Linus Torvalds
     

16 Apr, 2011

4 commits

  • It's a pretty close match to what we had before - the timer triggering
    would mean that nobody unplugged the plug in due time, in the new
    scheme this matches very closely what the schedule() unplug now is.
    It's essentially the difference between an explicit unplug (IO unplug)
    or an implicit unplug (timer unplug, we scheduled with pending IO
    queued).

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • Linus correctly observes that the most important dispatch cases
    are now done from kblockd, this isn't ideal for latency reasons.
    The original reason for switching dispatches out-of-line was to
    avoid too deep a stack, so by _only_ letting the "accidental"
    flush directly in schedule() be guarded by offload to kblockd,
    we should be able to get the best of both worlds.

    So add a blk_schedule_flush_plug() that offloads to kblockd,
    and only use that from the schedule() path.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • Signed-off-by: Harsh Prateek Bora
    Signed-off-by: Venkateswararao Jujjuri
    Signed-off-by: Eric VAn Hensbergen

    Harsh Prateek Bora
     
  • Now that we use write_inode to flush server
    cache related to fid, we don't need tsyncfs either fort dotl or dotu
    protocols. For dotu this helps to do a more efficient server flush.

    Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Venkateswararao Jujjuri
    Signed-off-by: Eric Van Hensbergen

    Aneesh Kumar K.V
     

15 Apr, 2011

8 commits

  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    block: only force kblockd unplugging from the schedule() path
    block: cleanup the block plug helper functions
    block, blk-sysfs: Use the variable directly instead of a function call
    block: move queue run on unplug to kblockd
    block: kill queue_sync_plugs()
    block: readd plug trace event
    block: add callback function for unplug notification
    block: add comment on why we save and disable interrupts in flush_plug_list()
    block: fixup block IO unplug trace call
    block: remove block_unplug_timer() trace point
    block: splice plug list to local context

    Linus Torvalds
     
  • For the explicit unplugging, we'd prefer to kick things off
    immediately and not pay the penalty of the latency to switch
    to kblockd. So let blk_finish_plug() do the run inline, while
    the implicit-on-schedule-out unplug will punt to kblockd.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • It's a bit of a mess currently. task->plug is being cleared
    and reset in __blk_finish_plug(), and blk_finish_plug() is
    testing for a NULL plug which cannot happen even from schedule()
    anymore since it uses blk_needs_flush_plug() to determine
    whether to call into this function at all.

    So get rid of some of the cruft.

    Signed-off-by: Jens Axboe

    Christoph Hellwig
     
  • Fix a possible problem with mport registration left non-cleared after
    fsl_rio_setup() exits on link error. Abort mport initialization if
    registration failed.

    This patch is applicable to 2.6.39-rc1 only. The problem does not exist
    for earlier versions.

    Signed-off-by: Alexandre Bounine
    Cc: Kumar Gala
    Cc: Matt Porter
    Cc: Li Yang
    Cc: Thomas Moll
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Kumar Gala
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • 5520e89 ("brk: fix min_brk lower bound computation for COMPAT_BRK")
    tried to get the whole logic of brk randomization for legacy
    (libc5-based) applications finally right.

    It turns out that the way to detect whether brk has actually been
    randomized in the end or not introduced by that patch still doesn't work
    for those binaries, as reported by Geert:

    : /sbin/init from my old m68k ramdisk exists prematurely.
    :
    : Before the patch:
    :
    : | brk(0x80005c8e) = 0x80006000
    :
    : After the patch:
    :
    : | brk(0x80005c8e) = 0x80005c8e
    :
    : Old libc5 considers brk() to have failed if the return value is not
    : identical to the requested value.

    I don't like it, but currently see no better option than a bit flag in
    task_struct to catch the CONFIG_COMPAT_BRK && randomize_va_space == 2
    case.

    Signed-off-by: Jiri Kosina
    Tested-by: Geert Uytterhoeven
    Reported-by: Geert Uytterhoeven
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Kosina
     
  • I found it difficult to make sense of transparent huge pages without
    having any counters for its actions. Add some counters to vmstat for
    allocation of transparent hugepages and fallback to smaller pages.

    Optional patch, but useful for development and understanding the system.

    Contains improvements from Andrea Arcangeli and Johannes Weiner

    [akpm@linux-foundation.org: coding-style fixes]
    [hannes@cmpxchg.org: fix vmstat_text[] entries]
    Signed-off-by: Andi Kleen
    Acked-by: Andrea Arcangeli
    Reviewed-by: KAMEZAWA Hiroyuki
    Signed-off-by: Johannes Weiner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • commit 3f58a8294333 ("move memcg reclaimable page into tail of inactive
    list") added inline keyword twice in its prototype.

    CC arch/x86/kernel/asm-offsets.s
    In file included from include/linux/swap.h:8,
    from include/linux/suspend.h:4,
    from arch/x86/kernel/asm-offsets.c:12:
    include/linux/memcontrol.h:220: error: duplicate `inline'

    Signed-off-by: Eric Dumazet
    Reviewed-by: Minchan Kim
    Cc: Balbir Singh
    Cc: KAMEZAWA Hiroyuki
    Cc: KOSAKI Motohiro
    Cc: Johannes Weiner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Dumazet
     

14 Apr, 2011

1 commit

  • USB tethering does not work anymore since 2.6.39-rc2, but it's okay in
    -rc1. The root cause is the new added mask code 'FLAG_POINTTOPOINT'
    overlaps 'FLAG_MULTI_PACKET' in include/linux/usb/usbnet.h, this
    causes logic issue in rx_process(). This patch cleans up the overlap.

    Reported-and-Tested-by: Gottfried Haider
    Signed-off-by: Huajun Li
    Signed-off-by: David S. Miller

    huajun li
     

13 Apr, 2011

6 commits

  • Add a new EV_SYN code, SYN_DROPPED, to inform the client when input
    events have been dropped from the evdev input buffer due to a
    buffer overrun. The client should use this event as a hint to
    reset its state or ignore all following events until the next
    packet begins.

    Signed-off-by: Jeff Brown
    [dtor@mail.ru: Implement Henrik's suggestion and drop old events in
    case of overflow.]
    Signed-off-by: Dmitry Torokhov

    Jeff Brown
     
  • Many media center remotes have buttons intended for jumping straight to
    one type of media browser or another -- commonly, images/photos/pictures,
    audio/music, television, and movies. At present, remotes with an images
    or photos or pictures button use any number of different keycodes which
    sort of maybe fit. I've seen at least KEY_MEDIA, KEY_CAMERA,
    KEY_GRAPHICSEDITOR and KEY_PRESENTATION. None of those seem quite right.
    In my mind, KEY_MEDIA should be something more like a media center
    application launcher (and I'd like to standardize on that for things
    like the windows media center button on the mce remotes). KEY_CAMERA is
    used in a lot of webcams, and typically means "take a picture now".
    KEY_GRAPHICSEDITOR implies an editor, not a browser. KEY_PRESENTATION
    might be the closest fit here, if you think "photo slide show", but it
    may well be more intended for "run application in full-screen
    presentation mode" or to launch something like magicpoint, I dunno.
    And thus, I'd like to have a KEY_IMAGES, which matches the HID Usage AL
    Image Browser, the meaning of which I think is crystal-clear. I believe
    AL Audio Browser is already covered by KEY_AUDIO, and AL Movie Browser
    by KEY_VIDEO, so I'm also adding appropriate comments next to those
    keys.

    Signed-off-by: Jarod Wilson
    Signed-off-by: Dmitry Torokhov

    Jarod Wilson
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
    fix XEN_SAVE_RESTORE Kconfig dependencies
    PM / Hibernate: Introduce CONFIG_HIBERNATE_CALLBACKS

    Linus Torvalds
     
  • …linux into timers/urgent

    Thomas Gleixner
     
  • Gaah. When commit be85bccaa5aa reverted the export of file system uuid
    via /proc//mountinfo, it also unintentionally removed the s_uuid
    field in struct super_block.

    I didn't mean to do that, since filesystems have been taught to fill it
    in (and we want to keep it for future re-introduction in the mountinfo
    file).

    Stupid of me. This adds it back in.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
    mfd: Fetch cell pointer from platform_device->mfd_cell

    Linus Torvalds