From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Annotate user relocs with __user
Date: Tue, 5 Sep 2017 21:25:00 +0300 [thread overview]
Message-ID: <20170905182500.GN4914@intel.com> (raw)
In-Reply-To: <20170901165434.24636-1-ville.syrjala@linux.intel.com>
On Fri, Sep 01, 2017 at 07:54:34PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Add the missing __user to the urelocs cast to fix the following sparse
> warning:
> i915_gem_execbuffer.c:1541:47: warning: cast removes address space of expression
> i915_gem_execbuffer.c:1541:62: warning: incorrect type in argument 2 (different address spaces)
> i915_gem_execbuffer.c:1541:62: expected void const [noderef] <asn:1>*from
> i915_gem_execbuffer.c:1541:62: got char *
>
> Cc: Chris Wilson <chris@chris-wilson.co.uk
> Fixes: 2889caa92321 ("drm/i915: Eliminate lots of iterations over the execobjects array")
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Pushed to dinq with Maarten's irq r-b
20:18 < vsyrjala> some care to r-b https://patchwork.freedesktop.org/patch/174831/ ?
...
20:39 < mlankhorst> irc r-b
20:48 < mlankhorst> vsyrjala: ^
> ---
> drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> index 8a9d37ac16d4..96f7fa983cbc 100644
> --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> @@ -1538,7 +1538,7 @@ static int eb_copy_relocations(const struct i915_execbuffer *eb)
> min_t(u64, BIT_ULL(31), size - copied);
>
> if (__copy_from_user((char *)relocs + copied,
> - (char *)urelocs + copied,
> + (char __user *)urelocs + copied,
> len)) {
> kvfree(relocs);
> err = -EFAULT;
> --
> 2.13.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2017-09-05 18:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-01 16:54 [PATCH] drm/i915: Annotate user relocs with __user ville.syrjala
2017-09-01 17:28 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-09-01 21:30 ` ✓ Fi.CI.IGT: " Patchwork
2017-09-05 18:25 ` Ville Syrjälä [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170905182500.GN4914@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox