summaryrefslogtreecommitdiffstats
path: root/src/drm-shim/drm_shim.c
diff options
context:
space:
mode:
authorChristian Gmeiner <[email protected]>2019-11-12 12:46:20 +0100
committerChristian Gmeiner <[email protected]>2019-11-13 12:39:14 +0000
commite101af8671a13a8eb8ce714e07294b73a99821cd (patch)
tree308b697c25fbe3e352cc4c829cc7af99a0f38939 /src/drm-shim/drm_shim.c
parentb12911c88e89c693a526db74f9399ee72dff77e7 (diff)
drm-shim: fix EOF case
Close input end of the pipe after data was written. Without this fix I have seen a hang in sysfs_uevent_get(.., "OF_FULLNAME") when key was not found. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/drm-shim/drm_shim.c')
-rw-r--r--src/drm-shim/drm_shim.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/drm-shim/drm_shim.c b/src/drm-shim/drm_shim.c
index 7c7d5f0f009..381a94fb9d1 100644
--- a/src/drm-shim/drm_shim.c
+++ b/src/drm-shim/drm_shim.c
@@ -219,6 +219,7 @@ PUBLIC FILE *fopen(const char *path, const char *mode)
pipe(fds);
write(fds[1], file_overrides[i].contents,
strlen(file_overrides[i].contents));
+ close(fds[1]);
return fdopen(fds[0], "r");
}
}