kernel-ark/include
Roland Dreier 1bf66a3042 IB: Put rlimit accounting struct in struct ib_umem
When memory pinned with ib_umem_get() is released, ib_umem_release()
needs to subtract the amount of memory being unpinned from
mm->locked_vm.  However, ib_umem_release() may be called with
mm->mmap_sem already held for writing if the memory is being released
as part of an munmap() call, so it is sometimes necessary to defer
this accounting into a workqueue.

However, the work struct used to defer this accounting is dynamically
allocated before it is queued, so there is the possibility of failing
that allocation.  If the allocation fails, then ib_umem_release has no
choice except to bail out and leave the process with a permanently
elevated locked_vm.

Fix this by allocating the structure to defer accounting as part of
the original struct ib_umem, so there's no possibility of failing a
later allocation if creating the struct ib_umem and pinning memory
succeeds.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-08 18:00:37 -07:00
..
acpi PNPACPI sets pnpdev->dev.archdata 2007-05-08 11:15:08 -07:00
asm-alpha Remove tas() 2007-05-08 11:15:20 -07:00
asm-arm Remove tas() 2007-05-08 11:15:20 -07:00
asm-arm26 Remove tas() 2007-05-08 11:15:20 -07:00
asm-avr32 Clean up mostly unused IOSPACE macros 2007-05-08 11:15:13 -07:00
asm-blackfin Remove tas() 2007-05-08 11:15:20 -07:00
asm-cris move die notifier handling to common code 2007-05-08 11:15:04 -07:00
asm-frv atomic.h: atomic_add_unless as inline. Remove system.h atomic.h circular dependency 2007-05-08 11:15:20 -07:00
asm-generic local_t: architecture independent extension 2007-05-08 11:15:20 -07:00
asm-h8300 Remove tas() 2007-05-08 11:15:20 -07:00
asm-i386 Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6 2007-05-08 12:07:28 -07:00
asm-ia64 local_t: ia64 extension 2007-05-08 11:15:20 -07:00
asm-m32r Remove tas() 2007-05-08 11:15:20 -07:00
asm-m68k Remove tas() 2007-05-08 11:15:20 -07:00
asm-m68knommu Remove tas() 2007-05-08 11:15:20 -07:00
asm-mips Remove tas() 2007-05-08 11:15:20 -07:00
asm-parisc local_t: parisc cleanup 2007-05-08 11:15:20 -07:00
asm-powerpc Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2007-05-08 11:50:19 -07:00
asm-ppc Remove tas() 2007-05-08 11:15:20 -07:00
asm-s390 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2007-05-08 11:57:17 -07:00
asm-sh Remove tas() 2007-05-08 11:15:20 -07:00
asm-sh64 Remove tas() 2007-05-08 11:15:20 -07:00
asm-sparc Remove tas() 2007-05-08 11:15:20 -07:00
asm-sparc64 Remove tas() 2007-05-08 11:15:20 -07:00
asm-um x86: create asm/cmpxchg.h 2007-05-08 11:15:20 -07:00
asm-v850 Remove tas() 2007-05-08 11:15:20 -07:00
asm-x86_64 Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6 2007-05-08 12:07:28 -07:00
asm-xtensa Remove tas() 2007-05-08 11:15:20 -07:00
crypto [CRYPTO] cryptd: Add software async crypto daemon 2007-05-02 14:38:32 +10:00
keys [AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both 2007-04-26 15:48:28 -07:00
linux Merge branch 'reset-seq' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev 2007-05-08 11:58:20 -07:00
math-emu Delete unused header file math-emu/extended.h 2007-05-08 11:15:05 -07:00
media i2c: Cleanup the includes of <linux/i2c.h> 2007-05-01 23:26:29 +02:00
mtd UBI: Unsorted Block Images 2007-04-27 14:23:33 +03:00
net cleanup compat ioctl handling 2007-05-08 11:15:09 -07:00
pcmcia add new_id to PCMCIA drivers 2007-05-07 12:12:50 -07:00
rdma IB: Put rlimit accounting struct in struct ib_umem 2007-05-08 18:00:37 -07:00
rxrpc [AF_RXRPC]: Delete the old RxRPC code. 2007-04-26 15:55:48 -07:00
scsi [SCSI] modalias for scsi devices 2007-04-17 18:15:04 -04:00
sound [ALSA] version 1.0.14rc3 2007-03-14 08:25:52 +01:00
video atyfb: halve XCLK with Mobility and 32bit memory 2007-05-08 11:15:32 -07:00
Kbuild