summaryrefslogtreecommitdiffstats
path: root/kernel/sys.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2024-05-08 18:16:58 +0200
committerTakashi Iwai <tiwai@suse.de>2024-05-08 18:16:58 +0200
commit9b61b2069681b60d0d0bedbd0fe3c70123dddb19 (patch)
tree483407944dd3037584b8825e0d33feb7f4eddf5f /kernel/sys.c
parentb9112b17950c955071abfd4331d4daa162d6ec4d (diff)
parent2ff85dc64df5bc0ff12e2f4e23fae7bbadbf1d5d (diff)
downloadlinux-stable-9b61b2069681b60d0d0bedbd0fe3c70123dddb19.tar.gz
linux-stable-9b61b2069681b60d0d0bedbd0fe3c70123dddb19.tar.bz2
linux-stable-9b61b2069681b60d0d0bedbd0fe3c70123dddb19.zip
Merge branch 'topic/hda-config-pm-cleanup' into for-next
Pull HD-audio CONFIG_PM cleanup. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'kernel/sys.c')
-rw-r--r--kernel/sys.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/sys.c b/kernel/sys.c
index f8e543f1e38a..8bb106a56b3a 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -2408,8 +2408,11 @@ static inline int prctl_set_mdwe(unsigned long bits, unsigned long arg3,
if (bits & PR_MDWE_NO_INHERIT && !(bits & PR_MDWE_REFUSE_EXEC_GAIN))
return -EINVAL;
- /* PARISC cannot allow mdwe as it needs writable stacks */
- if (IS_ENABLED(CONFIG_PARISC))
+ /*
+ * EOPNOTSUPP might be more appropriate here in principle, but
+ * existing userspace depends on EINVAL specifically.
+ */
+ if (!arch_memory_deny_write_exec_supported())
return -EINVAL;
current_bits = get_current_mdwe();