* [PATCH] mm, notifier: Fix early return case for new lockdep annotations
@ 2019-09-06 17:47 Daniel Vetter
2019-09-06 22:31 ` John Hubbard
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Daniel Vetter @ 2019-09-06 17:47 UTC (permalink / raw)
To: LKML
Cc: DRI Development, Daniel Vetter, syzbot+aaedc50d99a03250fe1f,
Jason Gunthorpe, Daniel Vetter, Andrew Morton,
Jérôme Glisse, Ralph Campbell, Jason Gunthorpe,
Ira Weiny, Michal Hocko, Sean Christopherson,
Jean-Philippe Brucker, linux-mm
I missed that when extending the lockdep annotations to the
nonblocking case.
I missed this while testing since in the i915 mmu notifiers is hitting
a nice lockdep splat already before the point of going into oom killer
mode :-/
Reported-by: syzbot+aaedc50d99a03250fe1f@syzkaller.appspotmail.com
Fixes: d2b219ed03d4 ("mm/mmu_notifiers: add a lockdep map for invalidate_range_start/end")
Cc: Jason Gunthorpe <jgg@mellanox.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: "Jérôme Glisse" <jglisse@redhat.com>
Cc: Ralph Campbell <rcampbell@nvidia.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Jean-Philippe Brucker <jean-philippe@linaro.org>
Cc: linux-mm@kvack.org
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
include/linux/mmu_notifier.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h
index 5a03417e5bf7..4edd98b06834 100644
--- a/include/linux/mmu_notifier.h
+++ b/include/linux/mmu_notifier.h
@@ -356,13 +356,14 @@ mmu_notifier_invalidate_range_start(struct mmu_notifier_range *range)
static inline int
mmu_notifier_invalidate_range_start_nonblock(struct mmu_notifier_range *range)
{
+ int ret = 0;
lock_map_acquire(&__mmu_notifier_invalidate_range_start_map);
if (mm_has_notifiers(range->mm)) {
range->flags &= ~MMU_NOTIFIER_RANGE_BLOCKABLE;
- return __mmu_notifier_invalidate_range_start(range);
+ ret = __mmu_notifier_invalidate_range_start(range);
}
lock_map_release(&__mmu_notifier_invalidate_range_start_map);
- return 0;
+ return ret;
}
static inline void
--
2.23.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mm, notifier: Fix early return case for new lockdep annotations
2019-09-06 17:47 [PATCH] mm, notifier: Fix early return case for new lockdep annotations Daniel Vetter
@ 2019-09-06 22:31 ` John Hubbard
2019-09-07 7:33 ` Jason Gunthorpe
2019-09-09 8:22 ` David Hildenbrand
2 siblings, 0 replies; 4+ messages in thread
From: John Hubbard @ 2019-09-06 22:31 UTC (permalink / raw)
To: Daniel Vetter, LKML
Cc: DRI Development, syzbot+aaedc50d99a03250fe1f, Jason Gunthorpe,
Daniel Vetter, Andrew Morton, Jérôme Glisse,
Ralph Campbell, Jason Gunthorpe, Ira Weiny, Michal Hocko,
Sean Christopherson, Jean-Philippe Brucker, linux-mm
On 9/6/19 10:47 AM, Daniel Vetter wrote:
> I missed that when extending the lockdep annotations to the
> nonblocking case.
>
> I missed this while testing since in the i915 mmu notifiers is hitting
> a nice lockdep splat already before the point of going into oom killer
> mode :-/
>
> Reported-by: syzbot+aaedc50d99a03250fe1f@syzkaller.appspotmail.com
> Fixes: d2b219ed03d4 ("mm/mmu_notifiers: add a lockdep map for invalidate_range_start/end")
> Cc: Jason Gunthorpe <jgg@mellanox.com>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: "Jérôme Glisse" <jglisse@redhat.com>
> Cc: Ralph Campbell <rcampbell@nvidia.com>
> Cc: Jason Gunthorpe <jgg@ziepe.ca>
> Cc: Ira Weiny <ira.weiny@intel.com>
> Cc: Michal Hocko <mhocko@suse.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Sean Christopherson <sean.j.christopherson@intel.com>
> Cc: Jean-Philippe Brucker <jean-philippe@linaro.org>
> Cc: linux-mm@kvack.org
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
> include/linux/mmu_notifier.h | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h
> index 5a03417e5bf7..4edd98b06834 100644
> --- a/include/linux/mmu_notifier.h
> +++ b/include/linux/mmu_notifier.h
> @@ -356,13 +356,14 @@ mmu_notifier_invalidate_range_start(struct mmu_notifier_range *range)
> static inline int
> mmu_notifier_invalidate_range_start_nonblock(struct mmu_notifier_range *range)
> {
> + int ret = 0;
> lock_map_acquire(&__mmu_notifier_invalidate_range_start_map);
> if (mm_has_notifiers(range->mm)) {
> range->flags &= ~MMU_NOTIFIER_RANGE_BLOCKABLE;
> - return __mmu_notifier_invalidate_range_start(range);
> + ret = __mmu_notifier_invalidate_range_start(range);
> }
> lock_map_release(&__mmu_notifier_invalidate_range_start_map);
> - return 0;
> + return ret;
> }
>
> static inline void
>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
thanks,
--
John Hubbard
NVIDIA
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm, notifier: Fix early return case for new lockdep annotations
2019-09-06 17:47 [PATCH] mm, notifier: Fix early return case for new lockdep annotations Daniel Vetter
2019-09-06 22:31 ` John Hubbard
@ 2019-09-07 7:33 ` Jason Gunthorpe
2019-09-09 8:22 ` David Hildenbrand
2 siblings, 0 replies; 4+ messages in thread
From: Jason Gunthorpe @ 2019-09-07 7:33 UTC (permalink / raw)
To: Daniel Vetter
Cc: LKML, DRI Development, syzbot+aaedc50d99a03250fe1f,
Daniel Vetter, Andrew Morton, Jérôme Glisse,
Ralph Campbell, Ira Weiny, Michal Hocko, Sean Christopherson,
Jean-Philippe Brucker, linux-mm
On Fri, Sep 06, 2019 at 07:47:30PM +0200, Daniel Vetter wrote:
> diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h
> index 5a03417e5bf7..4edd98b06834 100644
> +++ b/include/linux/mmu_notifier.h
> @@ -356,13 +356,14 @@ mmu_notifier_invalidate_range_start(struct mmu_notifier_range *range)
> static inline int
> mmu_notifier_invalidate_range_start_nonblock(struct mmu_notifier_range *range)
> {
> + int ret = 0;
> lock_map_acquire(&__mmu_notifier_invalidate_range_start_map);
> if (mm_has_notifiers(range->mm)) {
> range->flags &= ~MMU_NOTIFIER_RANGE_BLOCKABLE;
> - return __mmu_notifier_invalidate_range_start(range);
> + ret = __mmu_notifier_invalidate_range_start(range);
> }
> lock_map_release(&__mmu_notifier_invalidate_range_start_map);
> - return 0;
> + return ret;
Gar, yes. Since nobody has grabbed hmm.git I've squashed this into the
original patch and fixed the checkpatch warning about missing line
after the ret
Everything should be in linux-next the next time it builds
Thanks,
Jason
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm, notifier: Fix early return case for new lockdep annotations
2019-09-06 17:47 [PATCH] mm, notifier: Fix early return case for new lockdep annotations Daniel Vetter
2019-09-06 22:31 ` John Hubbard
2019-09-07 7:33 ` Jason Gunthorpe
@ 2019-09-09 8:22 ` David Hildenbrand
2 siblings, 0 replies; 4+ messages in thread
From: David Hildenbrand @ 2019-09-09 8:22 UTC (permalink / raw)
To: Daniel Vetter, LKML
Cc: DRI Development, syzbot+aaedc50d99a03250fe1f, Jason Gunthorpe,
Daniel Vetter, Andrew Morton, Jérôme Glisse,
Ralph Campbell, Jason Gunthorpe, Ira Weiny, Michal Hocko,
Sean Christopherson, Jean-Philippe Brucker, linux-mm
On 06.09.19 19:47, Daniel Vetter wrote:
> I missed that when extending the lockdep annotations to the
> nonblocking case.
>
> I missed this while testing since in the i915 mmu notifiers is hitting
> a nice lockdep splat already before the point of going into oom killer
> mode :-/
>
> Reported-by: syzbot+aaedc50d99a03250fe1f@syzkaller.appspotmail.com
> Fixes: d2b219ed03d4 ("mm/mmu_notifiers: add a lockdep map for invalidate_range_start/end")
> Cc: Jason Gunthorpe <jgg@mellanox.com>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: "Jérôme Glisse" <jglisse@redhat.com>
> Cc: Ralph Campbell <rcampbell@nvidia.com>
> Cc: Jason Gunthorpe <jgg@ziepe.ca>
> Cc: Ira Weiny <ira.weiny@intel.com>
> Cc: Michal Hocko <mhocko@suse.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Sean Christopherson <sean.j.christopherson@intel.com>
> Cc: Jean-Philippe Brucker <jean-philippe@linaro.org>
> Cc: linux-mm@kvack.org
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
> include/linux/mmu_notifier.h | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h
> index 5a03417e5bf7..4edd98b06834 100644
> --- a/include/linux/mmu_notifier.h
> +++ b/include/linux/mmu_notifier.h
> @@ -356,13 +356,14 @@ mmu_notifier_invalidate_range_start(struct mmu_notifier_range *range)
> static inline int
> mmu_notifier_invalidate_range_start_nonblock(struct mmu_notifier_range *range)
> {
> + int ret = 0;
> lock_map_acquire(&__mmu_notifier_invalidate_range_start_map);
> if (mm_has_notifiers(range->mm)) {
> range->flags &= ~MMU_NOTIFIER_RANGE_BLOCKABLE;
> - return __mmu_notifier_invalidate_range_start(range);
> + ret = __mmu_notifier_invalidate_range_start(range);
> }
> lock_map_release(&__mmu_notifier_invalidate_range_start_map);
> - return 0;
> + return ret;
> }
>
> static inline void
>
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-09-09 8:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-06 17:47 [PATCH] mm, notifier: Fix early return case for new lockdep annotations Daniel Vetter
2019-09-06 22:31 ` John Hubbard
2019-09-07 7:33 ` Jason Gunthorpe
2019-09-09 8:22 ` David Hildenbrand
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).