#ifndef XMALLOC_H #define XMALLOC_H #include #include "built_in.h" #include "die.h" extern void *xmalloc(size_t size) __hidden __warn_unused_result; extern void *xcalloc(size_t nmemb, size_t size) __hidden __warn_unused_result; extern void *xzmalloc(size_t size) __hidden __warn_unused_result; extern void *xmallocz(size_t size) __hidden __warn_unused_result; extern void *xmalloc_aligned(size_t size, size_t alignment) __hidden __warn_unused_result; extern void *xzmalloc_aligned(size_t size, size_t alignment) __hidden __warn_unused_result; extern void *xmemdupz(const void *data, size_t len) __hidden __warn_unused_result; extern void *xrealloc(void *ptr, size_t size) __hidden __warn_unused_result; extern void xfree_func(void *ptr) __hidden; extern char *xstrdup(const char *str) __hidden __warn_unused_result; extern char *xstrndup(const char *str, size_t size) __hidden __warn_unused_result; static inline void __xfree(void *ptr) { if (unlikely((ptr) == NULL)) panic("xfree: NULL pointer given as argument\n"); free(ptr); } #define xzfree(ptr, size) \ do { \ xmemset(ptr, 0, size); \ xfree(ptr); \ } while (0) #define xfree(ptr) \ do { \ __xfree(ptr); \ (ptr) = NULL; \ } while (0) #endif /* XMALLOC_H */ value='packet-loop-back'>packet-loop-back net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-11-08 10:07:13 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-11-08 10:07:13 -0800
commite3a00f68e426df24a5fb98956a1bd1b23943aa1e (patch)
treee796e9bc0d11ed988e5d7c5ec8e2b31e8a5e1987
parentb58ec8b5824717875b844a9e8cc62fc6eb5fd289 (diff)
parentbea64033dd7b5fb6296eda8266acab6364ce1554 (diff)
Merge tag 'iommu-fixes-v4.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
Pull IOMMU fixes from Joerg Roedel: - Four patches from Robin Murphy fix several issues with the recently merged generic DT-bindings support for arm-smmu drivers - A fix for a dead-lock issue in the VT-d driver, which shows up on iommu hotplug * tag 'iommu-fixes-v4.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/vt-d: Fix dead-locks in disable_dmar_iommu() path iommu/arm-smmu: Fix out-of-bounds dereference iommu/arm-smmu: Check that iommu_fwspecs are ours iommu/arm-smmu: Don't inadvertently reject multiple SMMUv3s iommu/arm-smmu: Work around ARM DMA configuration