Revision 2bcbf42add911ef63a6d90e92001dc2bcb053e68 authored by Shannon Nelson on 04 November 2020, 19:56:06 UTC, committed by Jakub Kicinski on 05 November 2020, 17:58:25 UTC
Check for corner case of port_init failure before using
the port_info pointer.

Fixes: 4d03e00a2140 ("ionic: Add initial ethtool support")
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Link: https://lore.kernel.org/r/20201104195606.61184-1-snelson@pensando.io
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 2aaf09a
Raw File
barrier.h
#ifndef LIBURING_BARRIER_H
#define LIBURING_BARRIER_H

#if defined(__x86_64) || defined(__i386__)
#define read_barrier()	__asm__ __volatile__("":::"memory")
#define write_barrier()	__asm__ __volatile__("":::"memory")
#else
/*
 * Add arch appropriate definitions. Be safe and use full barriers for
 * archs we don't have support for.
 */
#define read_barrier()	__sync_synchronize()
#define write_barrier()	__sync_synchronize()
#endif

#endif
back to top