lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081011213000.GB29496@electric-eye.fr.zoreil.com>
Date:	Sat, 11 Oct 2008 23:30:00 +0200
From:	Francois Romieu <romieu@...zoreil.com>
To:	Ron Mercer <ron.mercer@...gic.com>
Cc:	jeff@...zik.org, netdev@...r.kernel.org, linux-driver@...gic.com
Subject: Re: [PATCH 4/6] [NET-NEXT]qlge: Cleanup chip reset path.

Ron Mercer <ron.mercer@...gic.com> :
[...]
> diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
> index c257546..1788e5c 100755
> --- a/drivers/net/qlge/qlge_main.c
> +++ b/drivers/net/qlge/qlge_main.c
[...]
> @@ -3471,14 +3449,29 @@ static int qlge_set_mac_address(struct net_device *ndev, void *p)
>  static void qlge_tx_timeout(struct net_device *ndev)
>  {
>  	struct ql_adapter *qdev = (struct ql_adapter *)netdev_priv(ndev);
> -	queue_delayed_work(qdev->workqueue, &qdev->asic_reset_work, 0);
> +	ql_queue_asic_error(qdev);
>  }
>  
>  static void ql_asic_reset_work(struct work_struct *work)
>  {
>  	struct ql_adapter *qdev =
>  	    container_of(work, struct ql_adapter, asic_reset_work.work);
> -	ql_cycle_adapter(qdev);
> +	int status;
> +
> +	status = ql_adapter_down(qdev);
> +	if (status)
> +		goto error;
> +
> +	status = ql_adapter_up(qdev);
> +	if (status)
> +		goto error;
> +	return;
> +error:
> +	QPRINTK(qdev, IFUP, ALERT,
> +		"Driver up/down cycle failed, closing device\n");
> +	rtnl_lock();
> +	dev_close(qdev->ndev);
> +	rtnl_unlock();

ql_asic_reset_work
-> dev_close
   -> qlge_close
      -> ql_adapter_down
         -> cancel_delayed_work_sync(&qdev->asic_reset_work);
            -> __cancel_work_timer
               -> wait_on_work
                  -> wait_on_cpu_work
                     -> wait_for_completion

Imho it will wait forever.

-- 
Ueimor
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ