From cdf49e57329803709fe26cbc103c318bc9292ddb Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Fri, 12 Aug 2005 14:19:33 +0000 Subject: Reverting the previous via security-fix commit, since the assumption of contexts registered with the callers filp was wrong. --- linux-core/drm_context.c | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'linux-core/drm_context.c') diff --git a/linux-core/drm_context.c b/linux-core/drm_context.c index ce4b06ef..baa8437d 100644 --- a/linux-core/drm_context.c +++ b/linux-core/drm_context.c @@ -576,34 +576,4 @@ int drm_rmctx(struct inode *inode, struct file *filp, return 0; } -/** - * Check that a context is registered for a caller. - * - * \param priv file pointer private structure. - * \param handle context handle. - * \param arg user argument pointing to a drm_ctx structure. - * \return one if the context is registered with the file pointer. Zero otherwise. - */ - -int drm_check_context(drm_file_t *priv, drm_context_t handle) -{ - drm_device_t *dev = priv->head->dev; - int ret = 0; - - down(&dev->ctxlist_sem); - if (dev->ctxlist && !list_empty(&dev->ctxlist->head)) { - drm_ctx_list_t *pos, *n; - - list_for_each_entry_safe(pos, n, &dev->ctxlist->head, head) { - if (pos->handle == handle) { - ret = (pos->tag == priv); - break; - } - } - } - up(&dev->ctxlist_sem); - return ret; -} - -EXPORT_SYMBOL(drm_check_context); /*@}*/ -- cgit v1.2.3