* [PATCH] mm/zswap: unregister zswap_cpu_notifier_block in cleanup procedure
@ 2014-11-09 11:22 Mahendran Ganesh
2014-11-13 2:53 ` Seth Jennings
0 siblings, 1 reply; 3+ messages in thread
From: Mahendran Ganesh @ 2014-11-09 11:22 UTC (permalink / raw)
To: sjennings, minchan; +Cc: linux-mm, linux-kernel, Mahendran Ganesh
In zswap_cpu_init(), the code does not unregister *zswap_cpu_notifier_block*
during the cleanup procedure.
This patch fix this issue.
Signed-off-by: Mahendran Ganesh <opensource.ganesh@gmail.com>
---
mm/zswap.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/zswap.c b/mm/zswap.c
index ea064c1..51a2c45 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -404,6 +404,7 @@ static int zswap_cpu_init(void)
cleanup:
for_each_online_cpu(cpu)
__zswap_cpu_notifier(CPU_UP_CANCELED, cpu);
+ __unregister_cpu_notifier(&zswap_cpu_notifier_block);
cpu_notifier_register_done();
return -ENOMEM;
}
--
1.7.9.5
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mm/zswap: unregister zswap_cpu_notifier_block in cleanup procedure
2014-11-09 11:22 [PATCH] mm/zswap: unregister zswap_cpu_notifier_block in cleanup procedure Mahendran Ganesh
@ 2014-11-13 2:53 ` Seth Jennings
2014-11-13 13:55 ` Ganesh Mahendran
0 siblings, 1 reply; 3+ messages in thread
From: Seth Jennings @ 2014-11-13 2:53 UTC (permalink / raw)
To: Mahendran Ganesh; +Cc: minchan, linux-mm, linux-kernel
On Sun, Nov 09, 2014 at 07:22:23PM +0800, Mahendran Ganesh wrote:
> In zswap_cpu_init(), the code does not unregister *zswap_cpu_notifier_block*
> during the cleanup procedure.
This is not needed. If we are in the cleanup code, we never got to the
__register_cpu_notifier() call.
Thanks,
Seth
>
> This patch fix this issue.
>
> Signed-off-by: Mahendran Ganesh <opensource.ganesh@gmail.com>
> ---
> mm/zswap.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/mm/zswap.c b/mm/zswap.c
> index ea064c1..51a2c45 100644
> --- a/mm/zswap.c
> +++ b/mm/zswap.c
> @@ -404,6 +404,7 @@ static int zswap_cpu_init(void)
> cleanup:
> for_each_online_cpu(cpu)
> __zswap_cpu_notifier(CPU_UP_CANCELED, cpu);
> + __unregister_cpu_notifier(&zswap_cpu_notifier_block);
> cpu_notifier_register_done();
> return -ENOMEM;
> }
> --
> 1.7.9.5
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm/zswap: unregister zswap_cpu_notifier_block in cleanup procedure
2014-11-13 2:53 ` Seth Jennings
@ 2014-11-13 13:55 ` Ganesh Mahendran
0 siblings, 0 replies; 3+ messages in thread
From: Ganesh Mahendran @ 2014-11-13 13:55 UTC (permalink / raw)
To: Seth Jennings; +Cc: Minchan Kim, linux-mm, linux-kernel
2014-11-13 10:53 GMT+08:00 Seth Jennings <sjennings@variantweb.net>:
> On Sun, Nov 09, 2014 at 07:22:23PM +0800, Mahendran Ganesh wrote:
>> In zswap_cpu_init(), the code does not unregister *zswap_cpu_notifier_block*
>> during the cleanup procedure.
>
> This is not needed. If we are in the cleanup code, we never got to the
> __register_cpu_notifier() call.
Yes, you are right. Thanks for you review.
>
> Thanks,
> Seth
>
>>
>> This patch fix this issue.
>>
>> Signed-off-by: Mahendran Ganesh <opensource.ganesh@gmail.com>
>> ---
>> mm/zswap.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/mm/zswap.c b/mm/zswap.c
>> index ea064c1..51a2c45 100644
>> --- a/mm/zswap.c
>> +++ b/mm/zswap.c
>> @@ -404,6 +404,7 @@ static int zswap_cpu_init(void)
>> cleanup:
>> for_each_online_cpu(cpu)
>> __zswap_cpu_notifier(CPU_UP_CANCELED, cpu);
>> + __unregister_cpu_notifier(&zswap_cpu_notifier_block);
>> cpu_notifier_register_done();
>> return -ENOMEM;
>> }
>> --
>> 1.7.9.5
>>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-11-13 13:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-09 11:22 [PATCH] mm/zswap: unregister zswap_cpu_notifier_block in cleanup procedure Mahendran Ganesh
2014-11-13 2:53 ` Seth Jennings
2014-11-13 13:55 ` Ganesh Mahendran
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).