diff options
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/drm_dp_aux_dev.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_dp_aux_dev.c b/drivers/gpu/drm/drm_dp_aux_dev.c index f73b38b33a8e..3334baacf43d 100644 --- a/drivers/gpu/drm/drm_dp_aux_dev.c +++ b/drivers/gpu/drm/drm_dp_aux_dev.c @@ -159,6 +159,12 @@ static ssize_t auxdev_read(struct file *file, char __user *buf, size_t count, uint8_t localbuf[DP_AUX_MAX_PAYLOAD_BYTES]; ssize_t todo = min_t(size_t, bytes_pending, sizeof(localbuf)); + if (signal_pending(current)) { + res = num_bytes_processed ? + num_bytes_processed : -ERESTARTSYS; + goto out; + } + res = drm_dp_dpcd_read(aux_dev->aux, *offset, localbuf, todo); if (res <= 0) { res = num_bytes_processed ? num_bytes_processed : res; @@ -202,6 +208,12 @@ static ssize_t auxdev_write(struct file *file, const char __user *buf, uint8_t localbuf[DP_AUX_MAX_PAYLOAD_BYTES]; ssize_t todo = min_t(size_t, bytes_pending, sizeof(localbuf)); + if (signal_pending(current)) { + res = num_bytes_processed ? + num_bytes_processed : -ERESTARTSYS; + goto out; + } + if (__copy_from_user(localbuf, buf + num_bytes_processed, todo)) { res = num_bytes_processed ? |