Commit 8cf12de4 authored by Neil Horman's avatar Neil Horman Committed by Greg Kroah-Hartman

staging: unisys: Guard against task leakage

Its possible to overwrite the old task pointer in visornic_resume.  Add a
check to guard against that and a warning if we find that its already
running
Signed-off-by: default avatarNeil Horman <nhorman@redhat.com>
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 87a9404e
...@@ -2118,8 +2118,13 @@ static int visornic_resume(struct visor_device *dev, ...@@ -2118,8 +2118,13 @@ static int visornic_resume(struct visor_device *dev,
* we can start using the device again. * we can start using the device again.
* TODO: State transitions * TODO: State transitions
*/ */
visor_thread_start(&devdata->threadinfo, process_incoming_rsps, if (!devdata->threadinfo.id)
visor_thread_start(&devdata->threadinfo,
process_incoming_rsps,
devdata, "vnic_incoming"); devdata, "vnic_incoming");
else
pr_warn("vnic_incoming already running!\n");
init_rcv_bufs(netdev, devdata); init_rcv_bufs(netdev, devdata);
spin_lock_irqsave(&devdata->priv_lock, flags); spin_lock_irqsave(&devdata->priv_lock, flags);
devdata->enabled = 1; devdata->enabled = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment