Re: [PATCH v2] kernel/padata.c: share code between CPU_ONLINE and CPU_DOWN_FAILED, same to CPU_DOWN_PREPARE and CPU_UP_CANCELED
On 08/29/2013 12:42 PM, Herbert Xu wrote: > On Fri, Aug 23, 2013 at 12:44:48PM +0200, Steffen Klassert wrote: >> On Thu, Aug 22, 2013 at 02:43:37PM +0800, Chen Gang wrote: >>> Share code between CPU_ONLINE and CPU_DOWN_FAILED, same to >>> CPU_DOWN_PREPARE and CPU_UP_CANCELED. >>> >>> It will fix 2 bugs: >>> >>> "not check the return value of __padata_remove_cpu() and >>> __padata_add_cpu()". >>> "need add 'break' between CPU_UP_CANCELED and CPU_DOWN_FAILED". >>> >>> >>> Signed-off-by: Chen Gang >> >> This looks ok to me, Herbert can you take this one? >> >> Acked-by: Steffen Klassert > > Patch applied. Thanks! > Thank you too. -- Chen Gang -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2] kernel/padata.c: share code between CPU_ONLINE and CPU_DOWN_FAILED, same to CPU_DOWN_PREPARE and CPU_UP_CANCELED
On Fri, Aug 23, 2013 at 12:44:48PM +0200, Steffen Klassert wrote: > On Thu, Aug 22, 2013 at 02:43:37PM +0800, Chen Gang wrote: > > Share code between CPU_ONLINE and CPU_DOWN_FAILED, same to > > CPU_DOWN_PREPARE and CPU_UP_CANCELED. > > > > It will fix 2 bugs: > > > > "not check the return value of __padata_remove_cpu() and > > __padata_add_cpu()". > > "need add 'break' between CPU_UP_CANCELED and CPU_DOWN_FAILED". > > > > > > Signed-off-by: Chen Gang > > This looks ok to me, Herbert can you take this one? > > Acked-by: Steffen Klassert Patch applied. Thanks! -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2] kernel/padata.c: share code between CPU_ONLINE and CPU_DOWN_FAILED, same to CPU_DOWN_PREPARE and CPU_UP_CANCELED
On Fri, Aug 23, 2013 at 12:44:48PM +0200, Steffen Klassert wrote: On Thu, Aug 22, 2013 at 02:43:37PM +0800, Chen Gang wrote: Share code between CPU_ONLINE and CPU_DOWN_FAILED, same to CPU_DOWN_PREPARE and CPU_UP_CANCELED. It will fix 2 bugs: not check the return value of __padata_remove_cpu() and __padata_add_cpu(). need add 'break' between CPU_UP_CANCELED and CPU_DOWN_FAILED. Signed-off-by: Chen Gang gang.c...@asianux.com This looks ok to me, Herbert can you take this one? Acked-by: Steffen Klassert steffen.klass...@secunet.com Patch applied. Thanks! -- Email: Herbert Xu herb...@gondor.apana.org.au Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2] kernel/padata.c: share code between CPU_ONLINE and CPU_DOWN_FAILED, same to CPU_DOWN_PREPARE and CPU_UP_CANCELED
On 08/29/2013 12:42 PM, Herbert Xu wrote: On Fri, Aug 23, 2013 at 12:44:48PM +0200, Steffen Klassert wrote: On Thu, Aug 22, 2013 at 02:43:37PM +0800, Chen Gang wrote: Share code between CPU_ONLINE and CPU_DOWN_FAILED, same to CPU_DOWN_PREPARE and CPU_UP_CANCELED. It will fix 2 bugs: not check the return value of __padata_remove_cpu() and __padata_add_cpu(). need add 'break' between CPU_UP_CANCELED and CPU_DOWN_FAILED. Signed-off-by: Chen Gang gang.c...@asianux.com This looks ok to me, Herbert can you take this one? Acked-by: Steffen Klassert steffen.klass...@secunet.com Patch applied. Thanks! Thank you too. -- Chen Gang -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2] kernel/padata.c: share code between CPU_ONLINE and CPU_DOWN_FAILED, same to CPU_DOWN_PREPARE and CPU_UP_CANCELED
On 08/23/2013 06:47 PM, Herbert Xu wrote: > On Fri, Aug 23, 2013 at 12:44:48PM +0200, Steffen Klassert wrote: >> On Thu, Aug 22, 2013 at 02:43:37PM +0800, Chen Gang wrote: >>> Share code between CPU_ONLINE and CPU_DOWN_FAILED, same to >>> CPU_DOWN_PREPARE and CPU_UP_CANCELED. >>> >>> It will fix 2 bugs: >>> >>> "not check the return value of __padata_remove_cpu() and >>> __padata_add_cpu()". >>> "need add 'break' between CPU_UP_CANCELED and CPU_DOWN_FAILED". >>> >>> >>> Signed-off-by: Chen Gang >> >> This looks ok to me, Herbert can you take this one? > > Sure. > Thank you all. > Thanks, > Thanks. -- Chen Gang -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2] kernel/padata.c: share code between CPU_ONLINE and CPU_DOWN_FAILED, same to CPU_DOWN_PREPARE and CPU_UP_CANCELED
On 08/23/2013 06:47 PM, Herbert Xu wrote: On Fri, Aug 23, 2013 at 12:44:48PM +0200, Steffen Klassert wrote: On Thu, Aug 22, 2013 at 02:43:37PM +0800, Chen Gang wrote: Share code between CPU_ONLINE and CPU_DOWN_FAILED, same to CPU_DOWN_PREPARE and CPU_UP_CANCELED. It will fix 2 bugs: not check the return value of __padata_remove_cpu() and __padata_add_cpu(). need add 'break' between CPU_UP_CANCELED and CPU_DOWN_FAILED. Signed-off-by: Chen Gang gang.c...@asianux.com This looks ok to me, Herbert can you take this one? Sure. Thank you all. Thanks, Thanks. -- Chen Gang -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2] kernel/padata.c: share code between CPU_ONLINE and CPU_DOWN_FAILED, same to CPU_DOWN_PREPARE and CPU_UP_CANCELED
On Fri, Aug 23, 2013 at 12:44:48PM +0200, Steffen Klassert wrote: > On Thu, Aug 22, 2013 at 02:43:37PM +0800, Chen Gang wrote: > > Share code between CPU_ONLINE and CPU_DOWN_FAILED, same to > > CPU_DOWN_PREPARE and CPU_UP_CANCELED. > > > > It will fix 2 bugs: > > > > "not check the return value of __padata_remove_cpu() and > > __padata_add_cpu()". > > "need add 'break' between CPU_UP_CANCELED and CPU_DOWN_FAILED". > > > > > > Signed-off-by: Chen Gang > > This looks ok to me, Herbert can you take this one? Sure. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2] kernel/padata.c: share code between CPU_ONLINE and CPU_DOWN_FAILED, same to CPU_DOWN_PREPARE and CPU_UP_CANCELED
On Thu, Aug 22, 2013 at 02:43:37PM +0800, Chen Gang wrote: > Share code between CPU_ONLINE and CPU_DOWN_FAILED, same to > CPU_DOWN_PREPARE and CPU_UP_CANCELED. > > It will fix 2 bugs: > > "not check the return value of __padata_remove_cpu() and > __padata_add_cpu()". > "need add 'break' between CPU_UP_CANCELED and CPU_DOWN_FAILED". > > > Signed-off-by: Chen Gang This looks ok to me, Herbert can you take this one? Acked-by: Steffen Klassert -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2] kernel/padata.c: share code between CPU_ONLINE and CPU_DOWN_FAILED, same to CPU_DOWN_PREPARE and CPU_UP_CANCELED
On Thu, Aug 22, 2013 at 02:43:37PM +0800, Chen Gang wrote: Share code between CPU_ONLINE and CPU_DOWN_FAILED, same to CPU_DOWN_PREPARE and CPU_UP_CANCELED. It will fix 2 bugs: not check the return value of __padata_remove_cpu() and __padata_add_cpu(). need add 'break' between CPU_UP_CANCELED and CPU_DOWN_FAILED. Signed-off-by: Chen Gang gang.c...@asianux.com This looks ok to me, Herbert can you take this one? Acked-by: Steffen Klassert steffen.klass...@secunet.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2] kernel/padata.c: share code between CPU_ONLINE and CPU_DOWN_FAILED, same to CPU_DOWN_PREPARE and CPU_UP_CANCELED
On Fri, Aug 23, 2013 at 12:44:48PM +0200, Steffen Klassert wrote: On Thu, Aug 22, 2013 at 02:43:37PM +0800, Chen Gang wrote: Share code between CPU_ONLINE and CPU_DOWN_FAILED, same to CPU_DOWN_PREPARE and CPU_UP_CANCELED. It will fix 2 bugs: not check the return value of __padata_remove_cpu() and __padata_add_cpu(). need add 'break' between CPU_UP_CANCELED and CPU_DOWN_FAILED. Signed-off-by: Chen Gang gang.c...@asianux.com This looks ok to me, Herbert can you take this one? Sure. Thanks, -- Email: Herbert Xu herb...@gondor.apana.org.au Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2] kernel/padata.c: share code between CPU_ONLINE and CPU_DOWN_FAILED, same to CPU_DOWN_PREPARE and CPU_UP_CANCELED
On 08/22/2013 02:43 PM, Chen Gang wrote: > Share code between CPU_ONLINE and CPU_DOWN_FAILED, same to > CPU_DOWN_PREPARE and CPU_UP_CANCELED. > > It will fix 2 bugs: > > "not check the return value of __padata_remove_cpu() and > __padata_add_cpu()". > "need add 'break' between CPU_UP_CANCELED and CPU_DOWN_FAILED". > Do we need more details descriptions ? If so, could Steffen give more expert details information ? Thanks. > > Signed-off-by: Chen Gang > --- > kernel/padata.c | 20 > 1 files changed, 4 insertions(+), 16 deletions(-) > > diff --git a/kernel/padata.c b/kernel/padata.c > index 072f4ee..2f0037a 100644 > --- a/kernel/padata.c > +++ b/kernel/padata.c > @@ -846,6 +846,8 @@ static int padata_cpu_callback(struct notifier_block *nfb, > switch (action) { > case CPU_ONLINE: > case CPU_ONLINE_FROZEN: > + case CPU_DOWN_FAILED: > + case CPU_DOWN_FAILED_FROZEN: > if (!pinst_has_cpu(pinst, cpu)) > break; > mutex_lock(>lock); > @@ -857,6 +859,8 @@ static int padata_cpu_callback(struct notifier_block *nfb, > > case CPU_DOWN_PREPARE: > case CPU_DOWN_PREPARE_FROZEN: > + case CPU_UP_CANCELED: > + case CPU_UP_CANCELED_FROZEN: > if (!pinst_has_cpu(pinst, cpu)) > break; > mutex_lock(>lock); > @@ -865,22 +869,6 @@ static int padata_cpu_callback(struct notifier_block > *nfb, > if (err) > return notifier_from_errno(err); > break; > - > - case CPU_UP_CANCELED: > - case CPU_UP_CANCELED_FROZEN: > - if (!pinst_has_cpu(pinst, cpu)) > - break; > - mutex_lock(>lock); > - __padata_remove_cpu(pinst, cpu); > - mutex_unlock(>lock); > - > - case CPU_DOWN_FAILED: > - case CPU_DOWN_FAILED_FROZEN: > - if (!pinst_has_cpu(pinst, cpu)) > - break; > - mutex_lock(>lock); > - __padata_add_cpu(pinst, cpu); > - mutex_unlock(>lock); > } > > return NOTIFY_OK; > -- Chen Gang -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2] kernel/padata.c: share code between CPU_ONLINE and CPU_DOWN_FAILED, same to CPU_DOWN_PREPARE and CPU_UP_CANCELED
On 08/22/2013 02:43 PM, Chen Gang wrote: Share code between CPU_ONLINE and CPU_DOWN_FAILED, same to CPU_DOWN_PREPARE and CPU_UP_CANCELED. It will fix 2 bugs: not check the return value of __padata_remove_cpu() and __padata_add_cpu(). need add 'break' between CPU_UP_CANCELED and CPU_DOWN_FAILED. Do we need more details descriptions ? If so, could Steffen give more expert details information ? Thanks. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/padata.c | 20 1 files changed, 4 insertions(+), 16 deletions(-) diff --git a/kernel/padata.c b/kernel/padata.c index 072f4ee..2f0037a 100644 --- a/kernel/padata.c +++ b/kernel/padata.c @@ -846,6 +846,8 @@ static int padata_cpu_callback(struct notifier_block *nfb, switch (action) { case CPU_ONLINE: case CPU_ONLINE_FROZEN: + case CPU_DOWN_FAILED: + case CPU_DOWN_FAILED_FROZEN: if (!pinst_has_cpu(pinst, cpu)) break; mutex_lock(pinst-lock); @@ -857,6 +859,8 @@ static int padata_cpu_callback(struct notifier_block *nfb, case CPU_DOWN_PREPARE: case CPU_DOWN_PREPARE_FROZEN: + case CPU_UP_CANCELED: + case CPU_UP_CANCELED_FROZEN: if (!pinst_has_cpu(pinst, cpu)) break; mutex_lock(pinst-lock); @@ -865,22 +869,6 @@ static int padata_cpu_callback(struct notifier_block *nfb, if (err) return notifier_from_errno(err); break; - - case CPU_UP_CANCELED: - case CPU_UP_CANCELED_FROZEN: - if (!pinst_has_cpu(pinst, cpu)) - break; - mutex_lock(pinst-lock); - __padata_remove_cpu(pinst, cpu); - mutex_unlock(pinst-lock); - - case CPU_DOWN_FAILED: - case CPU_DOWN_FAILED_FROZEN: - if (!pinst_has_cpu(pinst, cpu)) - break; - mutex_lock(pinst-lock); - __padata_add_cpu(pinst, cpu); - mutex_unlock(pinst-lock); } return NOTIFY_OK; -- Chen Gang -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/