1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00

debug: make __read_chk a cancellation point (bug 29274)

The __read_chk function, as the implementation behind the fortified read
function, must be a cancellation point, thus it cannot use INLINE_SYSCALL.
This commit is contained in:
Andreas Schwab
2022-06-22 13:16:30 +02:00
parent 2249ec60a9
commit dc30acf20b
3 changed files with 57 additions and 10 deletions

View File

@@ -16,12 +16,6 @@
<https://www.gnu.org/licenses/>. */
#include <unistd.h>
#include <sys/param.h>
#ifdef HAVE_INLINED_SYSCALLS
# include <errno.h>
# include <sysdep.h>
#endif
ssize_t
__read_chk (int fd, void *buf, size_t nbytes, size_t buflen)
@@ -29,9 +23,5 @@ __read_chk (int fd, void *buf, size_t nbytes, size_t buflen)
if (nbytes > buflen)
__chk_fail ();
#ifdef HAVE_INLINED_SYSCALLS
return INLINE_SYSCALL (read, 3, fd, buf, nbytes);
#else
return __read (fd, buf, nbytes);
#endif
}