Re: [PATCH v2] init_module.2: Add ETXTBSY error for finit_module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Yang,

On 11/23/21 01:59, Yang Xu wrote:
Since kernel commit[1], finit_module fails with ETXTBSY error if fd has write permission.
Since kernel commit[2], finit_module fails with EBADF error if fd doesn't have read permission.

So we can use read-write permission to trigger ETXTBSY error all the time since linux 4.7.

[1]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=39d637af
[2]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=032146cd

Signed-off-by: Yang Xu <xuyang2018.jy@xxxxxxxxxxx>

Patch applied.

Thanks,
Alex

---
  man2/init_module.2 | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/man2/init_module.2 b/man2/init_module.2
index aac0c6631..77cd8c4a6 100644
--- a/man2/init_module.2
+++ b/man2/init_module.2
@@ -242,6 +242,12 @@ is invalid.
  .B ENOEXEC
  .I fd
  does not refer to an open file.
+.TP
+.BR ETXTBSY " (since Linux 4.7)"
+.\" commit 39d637af5aa7577f655c58b9e55587566c63a0af
+The file referred to by
+.I fd
+is opened for read-write.
  .PP
  In addition to the above errors, if the module's
  .I init


--
Alejandro Colomar
Linux man-pages comaintainer; http://www.kernel.org/doc/man-pages/



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux