net/failsafe: fix Rx interrupt reinstallation
authorMatan Azrad <matan@mellanox.com>
Wed, 14 Feb 2018 14:47:26 +0000 (14:47 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 14 Feb 2018 15:32:00 +0000 (16:32 +0100)
commit56b48dc5e3753d0988bbbeffee4cf5ab9b19f7cf
treee1a0a16850650da4a4e19163a18a5407d5cbdde7
parentba2f43464ed53fd1358cf7b1f483103c616f341c
net/failsafe: fix Rx interrupt reinstallation

Fail-safe dev_start() operation can be called by both the application
and the hot-plug alarm mechanism.

The installation of Rx interrupt are triggered from dev_start() in any
time it is called while actually the Rx interrupt should be installed
only by the application calls.

So, each plug-in event causes reinstallation which causes memory leak
and spoils the fail-safe Rx interrupt mechanism.

Trigger the Rx interrupt installation only when it does not exist.

Fixes: 9e0360aebf23 ("net/failsafe: register as Rx interrupt mode")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
drivers/net/failsafe/failsafe_intr.c