From: Neil Horman <nhorman@xxxxxxxxxx> 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: Neil Horman <nhorman@xxxxxxxxxx> Signed-off-by: Benjamin Romer <benjamin.romer@xxxxxxxxxx> --- drivers/staging/unisys/visornic/visornic_main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c index 923c580..6c60e18 100644 --- a/drivers/staging/unisys/visornic/visornic_main.c +++ b/drivers/staging/unisys/visornic/visornic_main.c @@ -2118,8 +2118,13 @@ static int visornic_resume(struct visor_device *dev, * we can start using the device again. * TODO: State transitions */ - visor_thread_start(&devdata->threadinfo, process_incoming_rsps, - devdata, "vnic_incoming"); + if (!devdata->threadinfo.id) + visor_thread_start(&devdata->threadinfo, + process_incoming_rsps, + devdata, "vnic_incoming"); + else + pr_warn("vnic_incoming already running!\n"); + init_rcv_bufs(netdev, devdata); spin_lock_irqsave(&devdata->priv_lock, flags); devdata->enabled = 1; -- 2.1.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel