aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-02-27ipmi: add options to disable openfirmware and PCI scanningCorey Minyard2-16/+40
Add try... parameters to disable pci and platform (openfirmware) device scanning for IPMI. Also add docs for all the try... parameters. Signed-off-by: Corey Minyard <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27ipmi: add new kernel options to prevent automatic ipmi initCorey Minyard1-4/+24
The configuration change building ipmi_si into the kernel precludes the use of a custom driver that can utilize more than one KCS interface, multiple IPMBs, and more than one BMC. This capability is important for fault-tolerant systems. Even if the kernel option ipmi_si.trydefaults=0 is specified, ipmi_si discovers and claims one of the KCS interfaces on a Stratus server. The inability to now prevent the kernel from managing this device is a regression from previous kernels. The regression breaks a capability fault-tolerant vendors have relied upon. To support both ACPI opregion access and the need to avoid activation of ipmi_si on some platforms, we've added two new kernel options, ipmi_si.tryacpi and ipmi_si.trydmi be added to prevent ipmi_si from initializing when these options are set to 0 on the kernel command line. With these options at the default value of 1, ipmi_si init proceeds according to the kernel default. Tested-by: Jim Paradis <[email protected]> Signed-off-by: Robert Evans <[email protected]> Signed-off-by: Jim Paradis <[email protected]> Signed-off-by: Tony Camuso <[email protected]> Signed-off-by: Corey Minyard <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27ipmi: remove superfluous kernel/userspace explanationRobert P. J. Day2-13/+1
Given the obvious distinction between kernel and userspace supported by uapi/, it seems unnecessary to comment on that. Signed-off-by: Robert P. J. Day <[email protected]> Signed-off-by: Corey Minyard <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27idr: explain WARN_ON_ONCE() on negative IDs out-of-range IDTejun Heo1-0/+10
Until recently, when an negative ID is specified, idr functions used to ignore the sign bit and proceeded with the operation with the rest of bits, which is bizarre and error-prone. The behavior recently got changed so that negative IDs are treated as invalid but we're triggering WARN_ON_ONCE() on negative IDs just in case somebody was depending on the sign bit being ignored, so that those can be detected and fixed easily. We only need this for a while. Explain why WARN_ON_ONCE()s are there and that they can be removed later. Signed-off-by: Tejun Heo <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27idr: implement lookup hintTejun Heo2-23/+40
While idr lookup isn't a particularly heavy operation, it still is too substantial to use in hot paths without worrying about the performance implications. With recent changes, each idr_layer covers 256 slots which should be enough to cover most use cases with single idr_layer making lookup hint very attractive. This patch adds idr->hint which points to the idr_layer which allocated an ID most recently and the fast path lookup becomes if (look up target's prefix matches that of the hinted layer) return hint->ary[ID's offset in the leaf layer]; which can be inlined. idr->hint is set to the leaf node on idr_fill_slot() and cleared from free_layer(). [[email protected]: always do slow path when hint is uninitialized] Signed-off-by: Tejun Heo <[email protected]> Cc: Kirill A. Shutemov <[email protected]> Cc: Sasha Levin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27idr: add idr_layer->prefixTejun Heo2-0/+14
Add a field which carries the prefix of ID the idr_layer covers. This will be used to implement lookup hint. This patch doesn't make use of the new field and doesn't introduce any behavior difference. Signed-off-by: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27idr: make idr_layer largerTejun Heo1-8/+7
With recent preloading changes, idr no longer keeps full layer cache per each idr instance (used to be ~6.5k per idr on 64bit) and the previous patch removed restriction on the bitmap size. Both now allow us to have larger layers. Increase IDR_BITS to 8 regardless of BITS_PER_LONG. Each layer is slightly larger than 2k on 64bit and 1k on 32bit and carries 256 entries. The size isn't too large, especially compared to what we used to waste on per-idr caches, and 256 entries should be able to serve most use cases with single layer. The max tree depth is 4 which is much better than the previous 6 on 64bit and 7 on 32bit. Signed-off-by: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27idr: remove length restriction from idr_layer->bitmapTejun Heo2-28/+18
Currently, idr->bitmap is declared as an unsigned long which restricts the number of bits an idr_layer can contain. All bitops can handle arbitrary positive integer bit number and there's no reason for this restriction. Declare idr_layer->bitmap using DECLARE_BITMAP() instead of a single unsigned long. * idr_layer->bitmap is now an array. '&' dropped from params to bitops. * Replaced "== IDR_FULL" tests with bitmap_full() and removed IDR_FULL. * Replaced find_next_bit() on ~bitmap with find_next_zero_bit(). * Replaced "bitmap = 0" with bitmap_clear(). This patch doesn't (or at least shouldn't) introduce any behavior changes. [[email protected]: checkpatch fixes] Signed-off-by: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27idr: remove MAX_IDR_MASK and move left MAX_IDR_* into idr.cTejun Heo6-22/+20
MAX_IDR_MASK is another weirdness in the idr interface. As idr covers whole positive integer range, it's defined as 0x7fffffff or INT_MAX. Its usage in idr_find(), idr_replace() and idr_remove() is bizarre. They basically mask off the sign bit and operate on the rest, so if the caller, by accident, passes in a negative number, the sign bit will be masked off and the remaining part will be used as if that was the input, which is worse than crashing. The constant is visible in idr.h and there are several users in the kernel. * drivers/i2c/i2c-core.c:i2c_add_numbered_adapter() Basically used to test if adap->nr is a negative number which isn't -1 and returns -EINVAL if so. idr_alloc() already has negative @start checking (w/ WARN_ON_ONCE), so this can go away. * drivers/infiniband/core/cm.c:cm_alloc_id() drivers/infiniband/hw/mlx4/cm.c:id_map_alloc() Used to wrap cyclic @start. Can be replaced with max(next, 0). Note that this type of cyclic allocation using idr is buggy. These are prone to spurious -ENOSPC failure after the first wraparound. * fs/super.c:get_anon_bdev() The ID allocated from ida is masked off before being tested whether it's inside valid range. ida allocated ID can never be a negative number and the masking is unnecessary. Update idr_*() functions to fail with -EINVAL when negative @id is specified and update other MAX_IDR_MASK users as described above. This leaves MAX_IDR_MASK without any user, remove it and relocate other MAX_IDR_* constants to lib/idr.c. Signed-off-by: Tejun Heo <[email protected]> Cc: Jean Delvare <[email protected]> Cc: Roland Dreier <[email protected]> Cc: Sean Hefty <[email protected]> Cc: Hal Rosenstock <[email protected]> Cc: "Marciniszyn, Mike" <[email protected]> Cc: Jack Morgenstein <[email protected]> Cc: Or Gerlitz <[email protected]> Cc: Al Viro <[email protected]> Acked-by: Wolfram Sang <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27idr: fix top layer handlingTejun Heo1-15/+23
Most functions in idr fail to deal with the high bits when the idr tree grows to the maximum height. * idr_get_empty_slot() stops growing idr tree once the depth reaches MAX_IDR_LEVEL - 1, which is one depth shallower than necessary to cover the whole range. The function doesn't even notice that it didn't grow the tree enough and ends up allocating the wrong ID given sufficiently high @starting_id. For example, on 64 bit, if the starting id is 0x7fffff01, idr_get_empty_slot() will grow the tree 5 layer deep, which only covers the 30 bits and then proceed to allocate as if the bit 30 wasn't specified. It ends up allocating 0x3fffff01 without the bit 30 but still returns 0x7fffff01. * __idr_remove_all() will not remove anything if the tree is fully grown. * idr_find() can't find anything if the tree is fully grown. * idr_for_each() and idr_get_next() can't iterate anything if the tree is fully grown. Fix it by introducing idr_max() which returns the maximum possible ID given the depth of tree and replacing the id limit checks in all affected places. As the idr_layer pointer array pa[] needs to be 1 larger than the maximum depth, enlarge pa[] arrays by one. While this plugs the discovered issues, the whole code base is horrible and in desparate need of rewrite. It's fragile like hell, Signed-off-by: Tejun Heo <[email protected]> Cc: Rusty Russell <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27nfs4client: convert to idr_alloc()Tejun Heo1-7/+6
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: Trond Myklebust <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27sctp: convert to idr_alloc()Tejun Heo1-16/+15
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Acked-by: Neil Horman <[email protected]> Acked-by: Vlad Yasevich <[email protected]> Cc: Sridhar Samudrala <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27mac80211: convert to idr_alloc()Tejun Heo2-16/+4
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Acked-by: Johannes Berg <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27net/9p: convert to idr_alloc()Tejun Heo1-11/+6
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: Eric Van Hensbergen <[email protected]> Cc: Ron Minnich <[email protected]> Cc: Latchesar Ionkov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27posix-timers: convert to idr_alloc()Tejun Heo1-10/+8
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27events: convert to idr_alloc()Tejun Heo1-7/+3
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27cgroup: convert to idr_alloc()Tejun Heo1-19/+8
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Acked-by: Li Zefan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27ipc: convert to idr_alloc()Tejun Heo1-21/+9
Convert to the much saner new idr interface. The new interface doesn't directly translate to the way idr_pre_get() was used around ipc_addid() as preloading disables preemption. From my cursory reading, it seems like we should be able to do all allocation from ipc_addid(), so I moved it there. Can you please check whether this would be okay? If this is wrong and ipc_addid() should be allowed to be called from non-sleepable context, I'd suggest allocating id itself in the outer functions and later install the pointer using idr_replace(). Signed-off-by: Tejun Heo <[email protected]> Reported-by: Sedat Dilek <[email protected]> Tested-by: Sedat Dilek <[email protected]> Cc: Stanislav Kinsbursky <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: James Morris <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27ocfs2: convert to idr_alloc()Tejun Heo1-19/+13
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: Mark Fasheh <[email protected]> Acked-by: Joel Becker <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27inotify: convert to idr_alloc()Tejun Heo1-13/+11
Convert to the much saner new idr interface. Note that the adhoc cyclic id allocation is buggy. If wraparound happens, the previous code with idr_get_new_above() may segfault and the converted code will trigger WARN and return -EINVAL. Even if it's fixed to wrap to zero, the code will be prone to unnecessary -ENOSPC failures after the first wraparound. We probably need to implement proper cyclic support in idr. Signed-off-by: Tejun Heo <[email protected]> Cc: John McCutchan <[email protected]> Cc: Robert Love <[email protected]> Cc: Eric Paris <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27dlm: convert to idr_alloc()Tejun Heo2-26/+19
Convert to the much saner new idr interface. Error return values from recover_idr_add() mix -1 and -errno. The conversion doesn't change that but it looks iffy. Signed-off-by: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27vfio: convert to idr_alloc()Tejun Heo1-16/+1
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Acked-by: Alex Williamson <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27uio: convert to idr_alloc()Tejun Heo1-15/+4
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Cc: "Hans J. Koch" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27thermal: convert to idr_alloc()Tejun Heo2-24/+10
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: Zhang Rui <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27scsi/lpfc: convert to idr_alloc()Tejun Heo1-8/+4
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Acked-by: James Smart <[email protected]> Cc: James Bottomley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27target/iscsi: convert to idr_alloc()Tejun Heo2-16/+14
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: Nicholas A. Bellinger <[email protected]> Cc: James Bottomley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27scsi: convert to idr_alloc()Tejun Heo3-57/+34
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27scsi/bfa: convert to idr_alloc()Tejun Heo1-11/+4
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: Krishna C Gudipati <[email protected]> Cc: James Bottomley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27rpmsg: convert to idr_alloc()Tejun Heo1-18/+12
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: Ohad Ben-Cohen <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27remoteproc: convert to idr_alloc()Tejun Heo1-7/+3
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: Ohad Ben-Cohen <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27pps: convert to idr_alloc()Tejun Heo2-23/+15
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: Rodolfo Giometti <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27power: convert to idr_alloc()Tejun Heo3-21/+8
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Acked-by: Anton Vorontsov <[email protected]> Cc: David Woodhouse <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27ppp: convert to idr_alloc()Tejun Heo1-29/+4
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: Paul Mackerras <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27macvtap: convert to idr_alloc()Tejun Heo1-16/+5
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: Jason Wang <[email protected]> Cc: Michael S. Tsirkin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27mtd: convert to idr_alloc()Tejun Heo1-7/+2
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Tested-by: Ezequiel Garcia <[email protected]> Cc: David Woodhouse <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27mmc: convert to idr_alloc()Tejun Heo1-5/+6
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: Chris Ball <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27misc/tifm_core: convert to idr_alloc()Tejun Heo1-5/+6
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Alex Dubov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27misc/c2port: convert to idr_alloc()Tejun Heo1-13/+9
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Rodolfo Giometti <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27mfd: convert to idr_alloc()Tejun Heo1-7/+6
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: Samuel Ortiz <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27memstick: convert to idr_alloc()Tejun Heo2-25/+13
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: Alex Dubov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27dm: convert to idr_alloc()Tejun Heo1-39/+15
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: Alasdair Kergon <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27IB/qib: convert to idr_alloc()Tejun Heo1-13/+8
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: Mike Marciniszyn <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27IB/ocrdma: convert to idr_alloc()Tejun Heo1-13/+1
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: Roland Dreier <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27IB/mlx4: convert to idr_alloc()Tejun Heo1-17/+15
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: Jack Morgenstein <[email protected]> Cc: Or Gerlitz <[email protected]> Cc: Roland Dreier <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27IB/ipath: convert to idr_alloc()Tejun Heo1-12/+4
Convert to the much saner new idr interface. [[email protected]: use GFP_NOWAIT under spin lock] Signed-off-by: Tejun Heo <[email protected]> Signed-off-by: Wei Yongjun <[email protected]> Cc: Mike Marciniszyn <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27IB/ehca: convert to idr_alloc()Tejun Heo2-39/+22
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Cc: Hoang-Nam Nguyen <[email protected]> Cc: Christoph Raisch <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27IB/cxgb4: convert to idr_alloc()Tejun Heo1-13/+14
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Reviewed-by: Steve Wise <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27IB/cxgb3: convert to idr_alloc()Tejun Heo1-13/+11
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Reviewed-by: Steve Wise <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27IB/amso1100: convert to idr_alloc()Tejun Heo1-8/+11
Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <[email protected]> Reviewed-by: Steve Wise <[email protected]> Cc: Tom Tucker <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-02-27IB/core: convert to idr_alloc()Tejun Heo6-81/+48
Convert to the much saner new idr interface. v2: Mike triggered WARN_ON() in idr_preload() because send_mad(), which may be used from non-process context, was calling idr_preload() unconditionally. Preload iff @gfp_mask has __GFP_WAIT. Signed-off-by: Tejun Heo <[email protected]> Reviewed-by: Sean Hefty <[email protected]> Reported-by: "Marciniszyn, Mike" <[email protected]> Cc: Roland Dreier <[email protected]> Cc: Sean Hefty <[email protected]> Cc: Hal Rosenstock <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>