mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-05 06:08:22 +00:00
drm/tegra: Fix NULL deref in debugfs/iova
When IOMMU is off, ->mm_lock is not initialized and ->mm is NULL. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
7664b2fa42
commit
68d890a3cc
1 changed files with 5 additions and 3 deletions
|
@ -1033,9 +1033,11 @@ static int tegra_debugfs_iova(struct seq_file *s, void *data)
|
|||
struct tegra_drm *tegra = drm->dev_private;
|
||||
struct drm_printer p = drm_seq_file_printer(s);
|
||||
|
||||
mutex_lock(&tegra->mm_lock);
|
||||
drm_mm_print(&tegra->mm, &p);
|
||||
mutex_unlock(&tegra->mm_lock);
|
||||
if (tegra->domain) {
|
||||
mutex_lock(&tegra->mm_lock);
|
||||
drm_mm_print(&tegra->mm, &p);
|
||||
mutex_unlock(&tegra->mm_lock);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue