Re: [Intel-gfx] [PATCH] drm/i915: Protect debugfs per_file_stats with RCU lock

2020-06-30 Thread Guenter Roeck
On Tue, Jun 30, 2020 at 04:08:00PM +0100, Chris Wilson wrote: > Quoting Guenter Roeck (2020-06-30 16:01:05) > > On Tue, Jun 30, 2020 at 10:14:25AM +0100, Chris Wilson wrote: > > [ ... ] > > > > > @@ -328,9 +334,9 @@ static void print_context_stats(struct seq_file > > > > > *m, > > > > >

Re: [Intel-gfx] [PATCH] drm/i915: Protect debugfs per_file_stats with RCU lock

2020-06-30 Thread Chris Wilson
Quoting Guenter Roeck (2020-06-30 16:01:05) > On Tue, Jun 30, 2020 at 10:14:25AM +0100, Chris Wilson wrote: > [ ... ] > > > > @@ -328,9 +334,9 @@ static void print_context_stats(struct seq_file *m, > > > > struct task_struct *task; > > > > char name[80];

Re: [Intel-gfx] [PATCH] drm/i915: Protect debugfs per_file_stats with RCU lock

2020-06-30 Thread Guenter Roeck
On Tue, Jun 30, 2020 at 10:14:25AM +0100, Chris Wilson wrote: [ ... ] > > > @@ -328,9 +334,9 @@ static void print_context_stats(struct seq_file *m, > > > struct task_struct *task; > > > char name[80]; > > > > > > -

Re: [Intel-gfx] [PATCH] drm/i915: Protect debugfs per_file_stats with RCU lock

2020-06-30 Thread Chris Wilson
Quoting Guenter Roeck (2020-06-30 06:39:36) > On Tue, Sep 03, 2019 at 07:21:33AM +0100, Chris Wilson wrote: > > If we make sure we grab a strong reference to each object as we dump it, > > we can reduce the locks outside of our iterators to an rcu_read_lock. > > > > This should prevent errors

Re: [Intel-gfx] [PATCH] drm/i915: Protect debugfs per_file_stats with RCU lock

2020-06-29 Thread Guenter Roeck
On Tue, Sep 03, 2019 at 07:21:33AM +0100, Chris Wilson wrote: > If we make sure we grab a strong reference to each object as we dump it, > we can reduce the locks outside of our iterators to an rcu_read_lock. > > This should prevent errors like: > [ 2138.371911] BUG: KASAN: use-after-free in

Re: [Intel-gfx] [PATCH] drm/i915: Protect debugfs per_file_stats with RCU lock

2019-09-04 Thread Mika Kuoppala
Chris Wilson writes: > If we make sure we grab a strong reference to each object as we dump it, > we can reduce the locks outside of our iterators to an rcu_read_lock. > > This should prevent errors like: > [ 2138.371911] BUG: KASAN: use-after-free in per_file_stats+0x43/0x380 [i915] > [

Re: [Intel-gfx] [PATCH] drm/i915: Protect debugfs per_file_stats with RCU lock

2019-09-04 Thread David Weinehall
On Tue, Sep 03, 2019 at 07:21:33AM +0100, Chris Wilson wrote: > If we make sure we grab a strong reference to each object as we dump it, > we can reduce the locks outside of our iterators to an rcu_read_lock. > > This should prevent errors like: > [ 2138.371911] BUG: KASAN: use-after-free in

[Intel-gfx] [PATCH] drm/i915: Protect debugfs per_file_stats with RCU lock

2019-09-03 Thread Chris Wilson
If we make sure we grab a strong reference to each object as we dump it, we can reduce the locks outside of our iterators to an rcu_read_lock. This should prevent errors like: [ 2138.371911] BUG: KASAN: use-after-free in per_file_stats+0x43/0x380 [i915] [ 2138.371924] Read of size 8 at addr