[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHA+R7O_QicCpZNpWzWGD_bGD7i4-ySVjV5UuUVpF8EMsohsPg@mail.gmail.com>
Date: Mon, 29 Sep 2014 09:47:30 -0700
From: Cong Wang <cwang@...pensource.com>
To: Amir Vadai <amirv@...lanox.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Ido Shamay <idos@...lanox.com>,
netdev <netdev@...r.kernel.org>,
Yevgeny Petrilin <yevgenyp@...lanox.com>,
Or Gerlitz <ogerlitz@...lanox.com>
Subject: Re: [PATCH net] net/mlx4_en: mlx4_en_netpoll shouldn't call
napi_schedule when port is down
On Mon, Sep 29, 2014 at 4:04 AM, Amir Vadai <amirv@...lanox.com> wrote:
> From: Ido Shamay <idos@...lanox.com>
>
> mlx4_en_netpoll, which is mlx4_en ndo_poll_controller callback,
> might be called when port is down, causing a napi_schedule when
> napi->poll callback in NULL. mutex_trylock is needed to acquire
> the port_state lock, since other threads may grab it and stop
> the port while we are in napi scheduling. Using trylock since in atomic
> context.
Are you sure it's safe? Its comment says:
* This function must not be used in interrupt context. The
* mutex must be released by the same task that acquired it.
Did you test it with LOCKDEP enabled?
--
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