#ifndef XMALLOC_H #define XMALLOC_H #include #include "built_in.h" #include "die.h" extern void *xmalloc(size_t size) __hidden; extern void *xzmalloc(size_t size) __hidden; extern void *xmallocz(size_t size) __hidden; extern void *xmalloc_aligned(size_t size, size_t alignment) __hidden; extern void *xzmalloc_aligned(size_t size, size_t alignment) __hidden; extern void *xmemdupz(const void *data, size_t len) __hidden; extern void *xrealloc(void *ptr, size_t nmemb, size_t size) __hidden; extern void xfree_func(void *ptr) __hidden; extern char *xstrdup(const char *str) __hidden; extern char *xstrndup(const char *str, size_t size) __hidden; 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 */ 9fd0af5b9c2c136c8c593491aeabf162'/> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/phy
diff options
context:
space:
mode:
authorLv Zheng <zetalog@gmail.com>2016-10-26 15:40:12 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-10-29 01:57:43 +0200
commit25ccd2429fd0af5b9c2c136c8c593491aeabf162 (patch)
tree6e42efd5429fddba4bdaf301708c7e2b9870e8f6 /Documentation/devicetree/bindings/phy
parent07d9a380680d1c0eb51ef87ff2eab5c994949e69 (diff)
ACPICA: Dispatcher: Fix order issue of method termination
The last step of the method termination should be the end of the method serialization. Otherwise, the steps happening after it will face the race issues that cannot be protected by the method serialization mechanism. This patch fixes this issue by moving the per-method-object deletion code prior than the end of the method serialization. Otherwise, the possible race issues may result in AE_ALREADY_EXISTS error in a parallel environment. Fixes: 74f51b80a0c4 (ACPICA: Namespace: Fix dynamic table loading issues) Reported-and-tested-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'Documentation/devicetree/bindings/phy')