All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fault-inject: use correct check for interrupts
@ 2017-03-21  9:18 ` Dmitry Vyukov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Vyukov @ 2017-03-21  9:18 UTC (permalink / raw)
  To: akinobu.mita, akpm; +Cc: Dmitry Vyukov, linux-kernel, linux-mm

in_interrupt() also returns true when bh is disabled in task context.
That's not what fail_task() wants to check.
Use the new in_task() predicate that does the right thing.

Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
Cc: akinobu.mita@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org

---

Andrew, do you mind taking this to mm?
---
 lib/fault-inject.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/fault-inject.c b/lib/fault-inject.c
index 6a823a53e357..4ff157159a0d 100644
--- a/lib/fault-inject.c
+++ b/lib/fault-inject.c
@@ -56,7 +56,7 @@ static void fail_dump(struct fault_attr *attr)
 
 static bool fail_task(struct fault_attr *attr, struct task_struct *task)
 {
-	return !in_interrupt() && task->make_it_fail;
+	return in_task() && task->make_it_fail;
 }
 
 #define MAX_STACK_TRACE_DEPTH 32
-- 
2.12.1.500.gab5fba24ee-goog

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] fault-inject: use correct check for interrupts
@ 2017-03-21  9:18 ` Dmitry Vyukov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Vyukov @ 2017-03-21  9:18 UTC (permalink / raw)
  To: akinobu.mita, akpm; +Cc: Dmitry Vyukov, linux-kernel, linux-mm

in_interrupt() also returns true when bh is disabled in task context.
That's not what fail_task() wants to check.
Use the new in_task() predicate that does the right thing.

Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
Cc: akinobu.mita@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org

---

Andrew, do you mind taking this to mm?
---
 lib/fault-inject.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/fault-inject.c b/lib/fault-inject.c
index 6a823a53e357..4ff157159a0d 100644
--- a/lib/fault-inject.c
+++ b/lib/fault-inject.c
@@ -56,7 +56,7 @@ static void fail_dump(struct fault_attr *attr)
 
 static bool fail_task(struct fault_attr *attr, struct task_struct *task)
 {
-	return !in_interrupt() && task->make_it_fail;
+	return in_task() && task->make_it_fail;
 }
 
 #define MAX_STACK_TRACE_DEPTH 32
-- 
2.12.1.500.gab5fba24ee-goog

--
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] 6+ messages in thread

* Re: [PATCH] fault-inject: use correct check for interrupts
  2017-03-21  9:18 ` Dmitry Vyukov
@ 2017-03-25  7:18   ` Akinobu Mita
  -1 siblings, 0 replies; 6+ messages in thread
From: Akinobu Mita @ 2017-03-25  7:18 UTC (permalink / raw)
  To: Dmitry Vyukov; +Cc: Andrew Morton, LKML, linux-mm

2017-03-21 18:18 GMT+09:00 Dmitry Vyukov <dvyukov@google.com>:
> in_interrupt() also returns true when bh is disabled in task context.
> That's not what fail_task() wants to check.
> Use the new in_task() predicate that does the right thing.
>
> Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
> Cc: akinobu.mita@gmail.com
> Cc: linux-kernel@vger.kernel.org
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: linux-mm@kvack.org

This change looks good to me.

Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] fault-inject: use correct check for interrupts
@ 2017-03-25  7:18   ` Akinobu Mita
  0 siblings, 0 replies; 6+ messages in thread
From: Akinobu Mita @ 2017-03-25  7:18 UTC (permalink / raw)
  To: Dmitry Vyukov; +Cc: Andrew Morton, LKML, linux-mm

2017-03-21 18:18 GMT+09:00 Dmitry Vyukov <dvyukov@google.com>:
> in_interrupt() also returns true when bh is disabled in task context.
> That's not what fail_task() wants to check.
> Use the new in_task() predicate that does the right thing.
>
> Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
> Cc: akinobu.mita@gmail.com
> Cc: linux-kernel@vger.kernel.org
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: linux-mm@kvack.org

This change looks good to me.

Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com>

--
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] 6+ messages in thread

* Re: [PATCH] fault-inject: use correct check for interrupts
  2017-03-25  7:18   ` Akinobu Mita
@ 2017-03-28  9:58     ` Dmitry Vyukov
  -1 siblings, 0 replies; 6+ messages in thread
From: Dmitry Vyukov @ 2017-03-28  9:58 UTC (permalink / raw)
  To: Akinobu Mita; +Cc: Andrew Morton, LKML, linux-mm

On Sat, Mar 25, 2017 at 8:18 AM, Akinobu Mita <akinobu.mita@gmail.com> wrote:
> 2017-03-21 18:18 GMT+09:00 Dmitry Vyukov <dvyukov@google.com>:
>> in_interrupt() also returns true when bh is disabled in task context.
>> That's not what fail_task() wants to check.
>> Use the new in_task() predicate that does the right thing.
>>
>> Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
>> Cc: akinobu.mita@gmail.com
>> Cc: linux-kernel@vger.kernel.org
>> Cc: Andrew Morton <akpm@linux-foundation.org>
>> Cc: linux-mm@kvack.org
>
> This change looks good to me.
>
> Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com>


Andrew, will you take this to mm please?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] fault-inject: use correct check for interrupts
@ 2017-03-28  9:58     ` Dmitry Vyukov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Vyukov @ 2017-03-28  9:58 UTC (permalink / raw)
  To: Akinobu Mita; +Cc: Andrew Morton, LKML, linux-mm

On Sat, Mar 25, 2017 at 8:18 AM, Akinobu Mita <akinobu.mita@gmail.com> wrote:
> 2017-03-21 18:18 GMT+09:00 Dmitry Vyukov <dvyukov@google.com>:
>> in_interrupt() also returns true when bh is disabled in task context.
>> That's not what fail_task() wants to check.
>> Use the new in_task() predicate that does the right thing.
>>
>> Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
>> Cc: akinobu.mita@gmail.com
>> Cc: linux-kernel@vger.kernel.org
>> Cc: Andrew Morton <akpm@linux-foundation.org>
>> Cc: linux-mm@kvack.org
>
> This change looks good to me.
>
> Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com>


Andrew, will you take this to mm please?

--
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] 6+ messages in thread

end of thread, other threads:[~2017-03-28  9:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-21  9:18 [PATCH] fault-inject: use correct check for interrupts Dmitry Vyukov
2017-03-21  9:18 ` Dmitry Vyukov
2017-03-25  7:18 ` Akinobu Mita
2017-03-25  7:18   ` Akinobu Mita
2017-03-28  9:58   ` Dmitry Vyukov
2017-03-28  9:58     ` Dmitry Vyukov

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.