* [PATCH] selftests/kcmp: Remove unused open mode
@ 2024-04-29 23:46 Edward Liaw
2024-04-30 17:47 ` Cyrill Gorcunov
0 siblings, 1 reply; 2+ messages in thread
From: Edward Liaw @ 2024-04-29 23:46 UTC (permalink / raw)
To: linux-kernel, Shuah Khan, Eric W. Biederman, Cyrill Gorcunov,
Andrew Morton
Cc: linux-kselftest, kernel-team, Edward Liaw
Android bionic warns that open modes are ignored if O_CREAT or O_TMPFILE
aren't specified. The permissions for the file are set above:
fd1 = open(kpath, O_RDWR | O_CREAT | O_TRUNC, 0644);
Fixes: d97b46a64674 ("syscalls, x86: add __NR_kcmp syscall")
Signed-off-by: Edward Liaw <edliaw@google.com>
---
tools/testing/selftests/kcmp/kcmp_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kcmp/kcmp_test.c b/tools/testing/selftests/kcmp/kcmp_test.c
index 25110c7c0b3e..d7a8e321bb16 100644
--- a/tools/testing/selftests/kcmp/kcmp_test.c
+++ b/tools/testing/selftests/kcmp/kcmp_test.c
@@ -91,7 +91,7 @@ int main(int argc, char **argv)
ksft_print_header();
ksft_set_plan(3);
- fd2 = open(kpath, O_RDWR, 0644);
+ fd2 = open(kpath, O_RDWR);
if (fd2 < 0) {
perror("Can't open file");
ksft_exit_fail();
--
2.44.0.769.g3c40516874-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] selftests/kcmp: Remove unused open mode
2024-04-29 23:46 [PATCH] selftests/kcmp: Remove unused open mode Edward Liaw
@ 2024-04-30 17:47 ` Cyrill Gorcunov
0 siblings, 0 replies; 2+ messages in thread
From: Cyrill Gorcunov @ 2024-04-30 17:47 UTC (permalink / raw)
To: Edward Liaw
Cc: linux-kernel, Shuah Khan, Eric W. Biederman, Andrew Morton,
linux-kselftest, kernel-team
On Mon, Apr 29, 2024 at 11:46:09PM +0000, Edward Liaw wrote:
> Android bionic warns that open modes are ignored if O_CREAT or O_TMPFILE
> aren't specified. The permissions for the file are set above:
>
> fd1 = open(kpath, O_RDWR | O_CREAT | O_TRUNC, 0644);
>
> Fixes: d97b46a64674 ("syscalls, x86: add __NR_kcmp syscall")
> Signed-off-by: Edward Liaw <edliaw@google.com>
Thanks!
Reviewed-by: Cyrill Gorcunov <gorcunov@gmail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-30 17:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-29 23:46 [PATCH] selftests/kcmp: Remove unused open mode Edward Liaw
2024-04-30 17:47 ` Cyrill Gorcunov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox