Commit 5952fba5 authored by Daniel Vetter's avatar Daniel Vetter Committed by Dave Airlie

drm: Kill file_priv->ioctl_count tracking

It's racy, and it's only used in debugfs. There are simpler ways to
know whether something is going on (like looking at dmesg with full
debugging enabled). And they're all much more useful.

So let's just rip this out.
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 43d1337c
...@@ -315,8 +315,6 @@ long drm_ioctl(struct file *filp, ...@@ -315,8 +315,6 @@ long drm_ioctl(struct file *filp,
if (drm_device_is_unplugged(dev)) if (drm_device_is_unplugged(dev))
return -ENODEV; return -ENODEV;
++file_priv->ioctl_count;
if ((nr >= DRM_CORE_IOCTL_COUNT) && if ((nr >= DRM_CORE_IOCTL_COUNT) &&
((nr < DRM_COMMAND_BASE) || (nr >= DRM_COMMAND_END))) ((nr < DRM_COMMAND_BASE) || (nr >= DRM_COMMAND_END)))
goto err_i1; goto err_i1;
......
...@@ -232,7 +232,6 @@ static int drm_open_helper(struct inode *inode, struct file *filp, ...@@ -232,7 +232,6 @@ static int drm_open_helper(struct inode *inode, struct file *filp,
goto out_put_pid; goto out_put_pid;
} }
priv->ioctl_count = 0;
/* for compatibility root is always authenticated */ /* for compatibility root is always authenticated */
priv->always_authenticated = capable(CAP_SYS_ADMIN); priv->always_authenticated = capable(CAP_SYS_ADMIN);
priv->authenticated = priv->always_authenticated; priv->authenticated = priv->always_authenticated;
......
...@@ -186,14 +186,14 @@ int drm_clients_info(struct seq_file *m, void *data) ...@@ -186,14 +186,14 @@ int drm_clients_info(struct seq_file *m, void *data)
struct drm_file *priv; struct drm_file *priv;
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
seq_printf(m, "a dev pid uid magic ioctls\n\n"); seq_printf(m, "a dev pid uid magic\n\n");
list_for_each_entry(priv, &dev->filelist, lhead) { list_for_each_entry(priv, &dev->filelist, lhead) {
seq_printf(m, "%c %3d %5d %5d %10u %10lu\n", seq_printf(m, "%c %3d %5d %5d %10u\n",
priv->authenticated ? 'y' : 'n', priv->authenticated ? 'y' : 'n',
priv->minor->index, priv->minor->index,
pid_vnr(priv->pid), pid_vnr(priv->pid),
from_kuid_munged(seq_user_ns(m), priv->uid), from_kuid_munged(seq_user_ns(m), priv->uid),
priv->magic, priv->ioctl_count); priv->magic);
} }
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->struct_mutex);
return 0; return 0;
......
...@@ -438,7 +438,6 @@ struct drm_file { ...@@ -438,7 +438,6 @@ struct drm_file {
struct pid *pid; struct pid *pid;
kuid_t uid; kuid_t uid;
drm_magic_t magic; drm_magic_t magic;
unsigned long ioctl_count;
struct list_head lhead; struct list_head lhead;
struct drm_minor *minor; struct drm_minor *minor;
unsigned long lock_count; unsigned long lock_count;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment