Subject: Re: [PATCH net] dcbnl : Fix lock initialization

From: John Fastabend <[email-masked]>
Date: Thu, 06 Nov 2014 11:03:16 -0800

On 11/06/2014 10:09 AM, Anish Bhatt wrote:
> dcb_lock was being used uninitialized in dcbnl and is infact missing
>   initialization code. Fixed
>

Are you trying to resolve a bug? It is initialized with

static DEFINE_SPINLOCK(dcb_lock);

and if you follow the code far enough you get to this in
spinlock_types.h:

  #ifdef CONFIG_DEBUG_SPINLOCK
  # define SPIN_DEBUG_INIT(lockname)      \
      .magic = SPINLOCK_MAGIC,        \
      .owner_cpu = -1,            \
      .owner = SPINLOCK_OWNER_INIT,
  #else
  # define SPIN_DEBUG_INIT(lockname)
  #endif

  #define __RAW_SPIN_LOCK_INITIALIZER(lockname)   \
      {                   \
      .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED,  \
      SPIN_DEBUG_INIT(lockname)       \
      SPIN_DEP_MAP_INIT(lockname) }

[...]

-- 
John Fastabend         Intel Corporation