* [PATCH 0/1] kasan: fix memory leak of kasan quarantine
@ 2020-12-15 11:28 ` Kuan-Ying Lee
0 siblings, 0 replies; 9+ messages in thread
From: Kuan-Ying Lee @ 2020-12-15 11:28 UTC (permalink / raw)
To: Andrey Ryabinin, Alexander Potapenko, Dmitry Vyukov,
Andrew Morton, Matthias Brugger
Cc: kasan-dev, linux-mm, linux-kernel, linux-arm-kernel,
linux-mediatek, wsd_upstream, stable, Kuan-Ying Lee
When cpu is going offline, set q->offline as true
and interrupt happened. The interrupt may call the
quarantine_put. But quarantine_put do not free the
the object. The object will cause memory leak.
Add qlink_free() to free the object.
Kuan-Ying Lee (1):
kasan: fix memory leak of kasan quarantine
mm/kasan/quarantine.c | 1 +
1 file changed, 1 insertion(+)
--
2.18.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 0/1] kasan: fix memory leak of kasan quarantine
@ 2020-12-15 11:28 ` Kuan-Ying Lee
0 siblings, 0 replies; 9+ messages in thread
From: Kuan-Ying Lee @ 2020-12-15 11:28 UTC (permalink / raw)
To: Andrey Ryabinin, Alexander Potapenko, Dmitry Vyukov,
Andrew Morton, Matthias Brugger
Cc: wsd_upstream, Kuan-Ying Lee, linux-kernel, kasan-dev, linux-mm,
linux-mediatek, stable, linux-arm-kernel
When cpu is going offline, set q->offline as true
and interrupt happened. The interrupt may call the
quarantine_put. But quarantine_put do not free the
the object. The object will cause memory leak.
Add qlink_free() to free the object.
Kuan-Ying Lee (1):
kasan: fix memory leak of kasan quarantine
mm/kasan/quarantine.c | 1 +
1 file changed, 1 insertion(+)
--
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 0/1] kasan: fix memory leak of kasan quarantine
@ 2020-12-15 11:28 ` Kuan-Ying Lee
0 siblings, 0 replies; 9+ messages in thread
From: Kuan-Ying Lee @ 2020-12-15 11:28 UTC (permalink / raw)
To: Andrey Ryabinin, Alexander Potapenko, Dmitry Vyukov,
Andrew Morton, Matthias Brugger
Cc: wsd_upstream, Kuan-Ying Lee, linux-kernel, kasan-dev, linux-mm,
linux-mediatek, stable, linux-arm-kernel
When cpu is going offline, set q->offline as true
and interrupt happened. The interrupt may call the
quarantine_put. But quarantine_put do not free the
the object. The object will cause memory leak.
Add qlink_free() to free the object.
Kuan-Ying Lee (1):
kasan: fix memory leak of kasan quarantine
mm/kasan/quarantine.c | 1 +
1 file changed, 1 insertion(+)
--
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/1] kasan: fix memory leak of kasan quarantine
2020-12-15 11:28 ` Kuan-Ying Lee
(?)
@ 2020-12-15 11:28 ` Kuan-Ying Lee
-1 siblings, 0 replies; 9+ messages in thread
From: Kuan-Ying Lee @ 2020-12-15 11:28 UTC (permalink / raw)
To: Andrey Ryabinin, Alexander Potapenko, Dmitry Vyukov,
Andrew Morton, Matthias Brugger
Cc: kasan-dev, linux-mm, linux-kernel, linux-arm-kernel,
linux-mediatek, wsd_upstream, stable, Kuan-Ying Lee
When cpu is going offline, set q->offline as true
and interrupt happened. The interrupt may call the
quarantine_put. But quarantine_put do not free the
the object. The object will cause memory leak.
Add qlink_free() to free the object.
Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: <stable@vger.kernel.org> [5.10-]
---
mm/kasan/quarantine.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/kasan/quarantine.c b/mm/kasan/quarantine.c
index 0e3f8494628f..cac7c617df72 100644
--- a/mm/kasan/quarantine.c
+++ b/mm/kasan/quarantine.c
@@ -191,6 +191,7 @@ void quarantine_put(struct kasan_free_meta *info, struct kmem_cache *cache)
q = this_cpu_ptr(&cpu_quarantine);
if (q->offline) {
+ qlink_free(&info->quarantine_link, cache);
local_irq_restore(flags);
return;
}
--
2.18.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 1/1] kasan: fix memory leak of kasan quarantine
@ 2020-12-15 11:28 ` Kuan-Ying Lee
0 siblings, 0 replies; 9+ messages in thread
From: Kuan-Ying Lee @ 2020-12-15 11:28 UTC (permalink / raw)
To: Andrey Ryabinin, Alexander Potapenko, Dmitry Vyukov,
Andrew Morton, Matthias Brugger
Cc: wsd_upstream, Kuan-Ying Lee, linux-kernel, kasan-dev, linux-mm,
linux-mediatek, stable, linux-arm-kernel
When cpu is going offline, set q->offline as true
and interrupt happened. The interrupt may call the
quarantine_put. But quarantine_put do not free the
the object. The object will cause memory leak.
Add qlink_free() to free the object.
Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: <stable@vger.kernel.org> [5.10-]
---
mm/kasan/quarantine.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/kasan/quarantine.c b/mm/kasan/quarantine.c
index 0e3f8494628f..cac7c617df72 100644
--- a/mm/kasan/quarantine.c
+++ b/mm/kasan/quarantine.c
@@ -191,6 +191,7 @@ void quarantine_put(struct kasan_free_meta *info, struct kmem_cache *cache)
q = this_cpu_ptr(&cpu_quarantine);
if (q->offline) {
+ qlink_free(&info->quarantine_link, cache);
local_irq_restore(flags);
return;
}
--
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 1/1] kasan: fix memory leak of kasan quarantine
@ 2020-12-15 11:28 ` Kuan-Ying Lee
0 siblings, 0 replies; 9+ messages in thread
From: Kuan-Ying Lee @ 2020-12-15 11:28 UTC (permalink / raw)
To: Andrey Ryabinin, Alexander Potapenko, Dmitry Vyukov,
Andrew Morton, Matthias Brugger
Cc: wsd_upstream, Kuan-Ying Lee, linux-kernel, kasan-dev, linux-mm,
linux-mediatek, stable, linux-arm-kernel
When cpu is going offline, set q->offline as true
and interrupt happened. The interrupt may call the
quarantine_put. But quarantine_put do not free the
the object. The object will cause memory leak.
Add qlink_free() to free the object.
Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: <stable@vger.kernel.org> [5.10-]
---
mm/kasan/quarantine.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/kasan/quarantine.c b/mm/kasan/quarantine.c
index 0e3f8494628f..cac7c617df72 100644
--- a/mm/kasan/quarantine.c
+++ b/mm/kasan/quarantine.c
@@ -191,6 +191,7 @@ void quarantine_put(struct kasan_free_meta *info, struct kmem_cache *cache)
q = this_cpu_ptr(&cpu_quarantine);
if (q->offline) {
+ qlink_free(&info->quarantine_link, cache);
local_irq_restore(flags);
return;
}
--
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] kasan: fix memory leak of kasan quarantine
2020-12-15 11:28 ` Kuan-Ying Lee
(?)
@ 2020-12-17 10:28 ` Kuan-Ying Lee
-1 siblings, 0 replies; 9+ messages in thread
From: Kuan-Ying Lee @ 2020-12-17 10:28 UTC (permalink / raw)
To: Andrey Ryabinin
Cc: Alexander Potapenko, Dmitry Vyukov, Andrew Morton,
Matthias Brugger, kasan-dev, linux-mm, linux-kernel,
linux-arm-kernel, linux-mediatek, wsd_upstream, stable
On Tue, 2020-12-15 at 19:28 +0800, Kuan-Ying Lee wrote:
> When cpu is going offline, set q->offline as true
> and interrupt happened. The interrupt may call the
> quarantine_put. But quarantine_put do not free the
> the object. The object will cause memory leak.
>
> Add qlink_free() to free the object.
>
> Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
> Cc: Alexander Potapenko <glider@google.com>
> Cc: Dmitry Vyukov <dvyukov@google.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: <stable@vger.kernel.org> [5.10-]
> ---
> mm/kasan/quarantine.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/mm/kasan/quarantine.c b/mm/kasan/quarantine.c
> index 0e3f8494628f..cac7c617df72 100644
> --- a/mm/kasan/quarantine.c
> +++ b/mm/kasan/quarantine.c
> @@ -191,6 +191,7 @@ void quarantine_put(struct kasan_free_meta *info, struct kmem_cache *cache)
>
> q = this_cpu_ptr(&cpu_quarantine);
> if (q->offline) {
> + qlink_free(&info->quarantine_link, cache);
> local_irq_restore(flags);
> return;
> }
Sorry.
Please ignore this patch.
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] kasan: fix memory leak of kasan quarantine
@ 2020-12-17 10:28 ` Kuan-Ying Lee
0 siblings, 0 replies; 9+ messages in thread
From: Kuan-Ying Lee @ 2020-12-17 10:28 UTC (permalink / raw)
To: Andrey Ryabinin
Cc: wsd_upstream, stable, linux-kernel, kasan-dev, linux-mm,
Alexander Potapenko, linux-arm-kernel, Matthias Brugger,
linux-mediatek, Andrew Morton, Dmitry Vyukov
On Tue, 2020-12-15 at 19:28 +0800, Kuan-Ying Lee wrote:
> When cpu is going offline, set q->offline as true
> and interrupt happened. The interrupt may call the
> quarantine_put. But quarantine_put do not free the
> the object. The object will cause memory leak.
>
> Add qlink_free() to free the object.
>
> Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
> Cc: Alexander Potapenko <glider@google.com>
> Cc: Dmitry Vyukov <dvyukov@google.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: <stable@vger.kernel.org> [5.10-]
> ---
> mm/kasan/quarantine.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/mm/kasan/quarantine.c b/mm/kasan/quarantine.c
> index 0e3f8494628f..cac7c617df72 100644
> --- a/mm/kasan/quarantine.c
> +++ b/mm/kasan/quarantine.c
> @@ -191,6 +191,7 @@ void quarantine_put(struct kasan_free_meta *info, struct kmem_cache *cache)
>
> q = this_cpu_ptr(&cpu_quarantine);
> if (q->offline) {
> + qlink_free(&info->quarantine_link, cache);
> local_irq_restore(flags);
> return;
> }
Sorry.
Please ignore this patch.
Thanks.
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] kasan: fix memory leak of kasan quarantine
@ 2020-12-17 10:28 ` Kuan-Ying Lee
0 siblings, 0 replies; 9+ messages in thread
From: Kuan-Ying Lee @ 2020-12-17 10:28 UTC (permalink / raw)
To: Andrey Ryabinin
Cc: wsd_upstream, stable, linux-kernel, kasan-dev, linux-mm,
Alexander Potapenko, linux-arm-kernel, Matthias Brugger,
linux-mediatek, Andrew Morton, Dmitry Vyukov
On Tue, 2020-12-15 at 19:28 +0800, Kuan-Ying Lee wrote:
> When cpu is going offline, set q->offline as true
> and interrupt happened. The interrupt may call the
> quarantine_put. But quarantine_put do not free the
> the object. The object will cause memory leak.
>
> Add qlink_free() to free the object.
>
> Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
> Cc: Alexander Potapenko <glider@google.com>
> Cc: Dmitry Vyukov <dvyukov@google.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: <stable@vger.kernel.org> [5.10-]
> ---
> mm/kasan/quarantine.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/mm/kasan/quarantine.c b/mm/kasan/quarantine.c
> index 0e3f8494628f..cac7c617df72 100644
> --- a/mm/kasan/quarantine.c
> +++ b/mm/kasan/quarantine.c
> @@ -191,6 +191,7 @@ void quarantine_put(struct kasan_free_meta *info, struct kmem_cache *cache)
>
> q = this_cpu_ptr(&cpu_quarantine);
> if (q->offline) {
> + qlink_free(&info->quarantine_link, cache);
> local_irq_restore(flags);
> return;
> }
Sorry.
Please ignore this patch.
Thanks.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-12-17 10:35 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15 11:28 [PATCH 0/1] kasan: fix memory leak of kasan quarantine Kuan-Ying Lee
2020-12-15 11:28 ` Kuan-Ying Lee
2020-12-15 11:28 ` Kuan-Ying Lee
2020-12-15 11:28 ` [PATCH 1/1] " Kuan-Ying Lee
2020-12-15 11:28 ` Kuan-Ying Lee
2020-12-15 11:28 ` Kuan-Ying Lee
2020-12-17 10:28 ` Kuan-Ying Lee
2020-12-17 10:28 ` Kuan-Ying Lee
2020-12-17 10:28 ` Kuan-Ying Lee
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.