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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user