All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: Yuval.Mintz@qlogic.com
Cc: netdev@vger.kernel.org, Ariel.Elior@qlogic.com
Subject: Re: [PATCH v2 net] bnx2x: Fix statistics locking scheme
Date: Wed, 18 Mar 2015 15:10:59 -0400 (EDT)	[thread overview]
Message-ID: <20150318.151059.979411313448939306.davem@davemloft.net> (raw)
In-Reply-To: <1426688042-20315-1-git-send-email-Yuval.Mintz@qlogic.com>

From: Yuval Mintz <Yuval.Mintz@qlogic.com>
Date: Wed, 18 Mar 2015 16:14:02 +0200

> +int bnx2x_stats_safe_exec(struct bnx2x *bp,
> +			  void (func_to_exec)(void *cookie),
> +			  void *cookie)
 ...
> +	if (bp->stats_pending) {
> +		BNX2X_ERR("Failed to wait for stats pending to clear\n");
> +		return -EBUSY;

Buggy, this returns with the stats_lock still held.

In my humble opinion, you are putting very little care and effort into
this bug fix.

Also I disagree with your timeout logic.

I suspect that the real reason these timeouts are present, is that
the locking hierarchy is uncertain.

Nothing really should create the situation those trylocks seem to
be dealing with.

  reply	other threads:[~2015-03-18 19:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-18 14:14 [PATCH v2 net] bnx2x: Fix statistics locking scheme Yuval Mintz
2015-03-18 19:10 ` David Miller [this message]
2015-03-19  7:26   ` Yuval Mintz
2015-03-19 16:23     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150318.151059.979411313448939306.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Ariel.Elior@qlogic.com \
    --cc=Yuval.Mintz@qlogic.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.