diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2011-11-09 16:20:35 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-11-11 06:05:19 -0500 |
commit | b3e067c0b276197b59046d7095b01b99f98b2821 (patch) | |
tree | 90a260a3a560e0f06398db84ebe3feb27d569128 /include/drm | |
parent | 3b9832f662d195755e7308f92368d44458268457 (diff) |
drm: serialize access to list of debugfs files
Nouveau, when configured with debugfs, creates debugfs files for every
channel, so structure holding list of files needs to be protected from
simultaneous changes by multiple threads.
Without this patch it's possible to hit kernel oops in
drm_debugfs_remove_files just by running a couple of xterms with
looped glxinfo.
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drmP.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index cf399495d38f..1f9e9516e2b7 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -990,7 +990,9 @@ struct drm_minor { | |||
990 | struct proc_dir_entry *proc_root; /**< proc directory entry */ | 990 | struct proc_dir_entry *proc_root; /**< proc directory entry */ |
991 | struct drm_info_node proc_nodes; | 991 | struct drm_info_node proc_nodes; |
992 | struct dentry *debugfs_root; | 992 | struct dentry *debugfs_root; |
993 | struct drm_info_node debugfs_nodes; | 993 | |
994 | struct list_head debugfs_list; | ||
995 | struct mutex debugfs_lock; /* Protects debugfs_list. */ | ||
994 | 996 | ||
995 | struct drm_master *master; /* currently active master for this node */ | 997 | struct drm_master *master; /* currently active master for this node */ |
996 | struct list_head master_list; | 998 | struct list_head master_list; |