[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20130717.181747.1265135119980557818.davem@davemloft.net>
Date: Wed, 17 Jul 2013 18:17:47 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: dmitry@...adcom.com
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net v3 2/6] bnx2x: prevent statistics update flow to
act before statistics are started
From: "Dmitry Kravkov" <dmitry@...adcom.com>
Date: Thu, 18 Jul 2013 01:00:36 +0300
> @@ -1830,6 +1830,7 @@ struct bnx2x {
>
> int fp_array_size;
> u32 dump_preset_idx;
> + atomic_t stats_started;
The only uses of those stats_started member are with atomic_set()
and atomic_read(), neither of which are atomic operations.
If there is existing locking which protects this value, then
a simple "bool stats_started;" would work.
Otherwise, you'll need to use an "unsigned long" set of atomic
bits and operations such as test_and_set_bit().
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists