#ifndef IPV4_H #define IPV4_H #include #include "built_in.h" struct ipv4hdr { #if defined(__LITTLE_ENDIAN_BITFIELD) __extension__ uint8_t h_ihl:4, h_version:4; #elif defined (__BIG_ENDIAN_BITFIELD) __extension__ uint8_t h_version:4, h_ihl:4; #else # error "Please fix " #endif uint8_t h_tos; uint16_t h_tot_len; uint16_t h_id; uint16_t h_frag_off; uint8_t h_ttl; uint8_t h_protocol; uint16_t h_check; uint32_t h_saddr; uint32_t h_daddr; } __packed; #endif /* IPV4_H */ -git' href='http:///git.distanz.ch/cgit.cgi/linux/net-next.git' title='net-next.git Git repository'/>
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2016-08-23 16:08:21 -0700
committerThomas Gleixner <tglx@linutronix.de>2016-08-24 09:34:31 +0200
commit27727df240c7cc84f2ba6047c6f18d5addfd25ef (patch)
tree92bc0d5823e29fc5ea10c1707e80bebada834660
parentfa8410b355251fd30341662a40ac6b22d3e38468 (diff)
timekeeping: Avoid taking lock in NMI path with CONFIG_DEBUG_TIMEKEEPING
When I added some extra sanity checking in timekeeping_get_ns() under CONFIG_DEBUG_TIMEKEEPING, I missed that the NMI safe __ktime_get_fast_ns() method was using timekeeping_get_ns(). Thus the locking added to the debug checks broke the NMI-safety of __ktime_get_fast_ns(). This patch open-codes the timekeeping_get_ns() logic for __ktime_get_fast_ns(), so can avoid any deadlocks in NMI. Fixes: 4ca22c2648f9 "timekeeping: Add warnings when overflows or underflows are observed" Reported-by: Steven Rostedt <rostedt@goodmis.org> Reported-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: John Stultz <john.stultz@linaro.org> Cc: stable <stable@vger.kernel.org> Link: http://lkml.kernel.org/r/1471993702-29148-2-git-send-email-john.stultz@linaro.org Signed-off-by: Thomas Gleixner <tglx@linutronix.de>