lkml.org 
[lkml]   [2007]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] bonding: replace system timer with work queue
Date
On Wed, 28 Feb 2007 10:12:01 +0100 (CET)
Jaroslav Kysela <perex@suse.cz> wrote:

> Hi,
>
> please, review and apply to mm tree for further testing. The patch
> is also available at
> ftp://ftp.alsa-project.org/pub/kernel-patches/bonding-workqueue.patch .
>
> Thank you,
> Jaroslav
>

You should submit network patches to the entry in the MAINTAINERS file.

BONDING DRIVER
P: Chad Tindel
M: ctindel@users.sourceforge.net
P: Jay Vosburgh
M: fubar@us.ibm.com
L: bonding-devel@lists.sourceforge.net
W: http://sourceforge.net/projects/bonding/
S: Supported


> @@ -3569,20 +3552,20 @@ static int bond_close(struct net_device
> */
>
> if (bond->params.miimon) { /* link check interval, in milliseconds. */
> - del_timer_sync(&bond->mii_timer);
> + cancel_rearming_delayed_workqueue(bond_wq, &bond->mii_work);
> }
>
> if (bond->params.arp_interval) { /* arp interval, in milliseconds. */
> - del_timer_sync(&bond->arp_timer);
> + cancel_rearming_delayed_workqueue(bond_wq, &bond->arp_work);
> }
>
> switch (bond->params.mode) {
> case BOND_MODE_8023AD:
> - del_timer_sync(&(BOND_AD_INFO(bond).ad_timer));
> + cancel_rearming_delayed_workqueue(bond_wq, &(BOND_AD_INFO(bond).ad_work));
> break;
> case BOND_MODE_TLB:
> case BOND_MODE_ALB:
> - del_timer_sync(&(BOND_ALB_INFO(bond).alb_timer));
> + cancel_rearming_delayed_workqueue(bond_wq, &(BOND_ALB_INFO(bond).alb_work));
> break;
> default:
> break;


This part will deadlock since it is not safe to cancel a workqueue
entry with RTNL mutex held. The cancel operation has to wait for the workqueue
to run, and the entry being run maybe stuck waiting for the RTNL.



--
Stephen Hemminger <shemminger@linux-foundation.org>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-02-28 23:21    [W:0.604 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site