diff mbox

Net / pktgen: Fix freezing problem

Message ID 201002042250.58944.rjw@sisk.pl
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Rafael J. Wysocki Feb. 4, 2010, 9:50 p.m. UTC
From: Rafael J. Wysocki <rjw@sisk.pl>
Subject: Net / pktgen: Fix freezing problem

Add missing try_to_freeze() to one of the pktgen_thread_worker() code
paths so that it doesn't block suspend/hibernation.

Fixes http://bugzilla.kernel.org/show_bug.cgi?id=15006

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-and-tested-by: Ciprian Dorin Craciun <ciprian.craciun@gmail.com>
---
 net/core/pktgen.c |    1 +
 1 file changed, 1 insertion(+)

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller Feb. 4, 2010, 10 p.m. UTC | #1
From: "Rafael J. Wysocki" <rjw@sisk.pl>
Date: Thu, 4 Feb 2010 22:50:58 +0100

> From: Rafael J. Wysocki <rjw@sisk.pl>
> Subject: Net / pktgen: Fix freezing problem
> 
> Add missing try_to_freeze() to one of the pktgen_thread_worker() code
> paths so that it doesn't block suspend/hibernation.
> 
> Fixes http://bugzilla.kernel.org/show_bug.cgi?id=15006
> 
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> Reported-and-tested-by: Ciprian Dorin Craciun <ciprian.craciun@gmail.com>

Applied, thanks a lot.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Andrew Morton Feb. 4, 2010, 10:12 p.m. UTC | #2
On Thu, 4 Feb 2010 22:50:58 +0100 "Rafael J. Wysocki" <rjw@sisk.pl> wrote:

> From: Rafael J. Wysocki <rjw@sisk.pl>
> Subject: Net / pktgen: Fix freezing problem
> 
> Add missing try_to_freeze() to one of the pktgen_thread_worker() code
> paths so that it doesn't block suspend/hibernation.
> 
> Fixes http://bugzilla.kernel.org/show_bug.cgi?id=15006
> 
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> Reported-and-tested-by: Ciprian Dorin Craciun <ciprian.craciun@gmail.com>
> ---
>  net/core/pktgen.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> Index: linux-2.6/net/core/pktgen.c
> ===================================================================
> --- linux-2.6.orig/net/core/pktgen.c
> +++ linux-2.6/net/core/pktgen.c
> @@ -3524,6 +3524,7 @@ static int pktgen_thread_worker(void *ar
>  			wait_event_interruptible_timeout(t->queue,
>  							 t->control != 0,
>  							 HZ/10);
> +			try_to_freeze();
>  			continue;
>  		}
>  

Also needed in -stable, IMO.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafael J. Wysocki Feb. 4, 2010, 10:19 p.m. UTC | #3
On Thursday 04 February 2010, Andrew Morton wrote:
> On Thu, 4 Feb 2010 22:50:58 +0100 "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> 
> > From: Rafael J. Wysocki <rjw@sisk.pl>
> > Subject: Net / pktgen: Fix freezing problem
> > 
> > Add missing try_to_freeze() to one of the pktgen_thread_worker() code
> > paths so that it doesn't block suspend/hibernation.
> > 
> > Fixes http://bugzilla.kernel.org/show_bug.cgi?id=15006
> > 
> > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> > Reported-and-tested-by: Ciprian Dorin Craciun <ciprian.craciun@gmail.com>
> > ---
> >  net/core/pktgen.c |    1 +
> >  1 file changed, 1 insertion(+)
> > 
> > Index: linux-2.6/net/core/pktgen.c
> > ===================================================================
> > --- linux-2.6.orig/net/core/pktgen.c
> > +++ linux-2.6/net/core/pktgen.c
> > @@ -3524,6 +3524,7 @@ static int pktgen_thread_worker(void *ar
> >  			wait_event_interruptible_timeout(t->queue,
> >  							 t->control != 0,
> >  							 HZ/10);
> > +			try_to_freeze();
> >  			continue;
> >  		}
> >  
> 
> Also needed in -stable, IMO.

Indeed.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Feb. 4, 2010, 10:33 p.m. UTC | #4
From: Andrew Morton <akpm@linux-foundation.org>
Date: Thu, 4 Feb 2010 14:12:39 -0800

> Also needed in -stable, IMO.

I'll queue it up, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

Index: linux-2.6/net/core/pktgen.c
===================================================================
--- linux-2.6.orig/net/core/pktgen.c
+++ linux-2.6/net/core/pktgen.c
@@ -3524,6 +3524,7 @@  static int pktgen_thread_worker(void *ar
 			wait_event_interruptible_timeout(t->queue,
 							 t->control != 0,
 							 HZ/10);
+			try_to_freeze();
 			continue;
 		}