Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 271b53d6 authored by Ben Hutchings's avatar Ben Hutchings Committed by Greg Kroah-Hartman
Browse files

Revert "y2038: rusage: use __kernel_old_timeval"



This reverts commit d5e38d6b, which
was commit bdd565f817a74b9e30edec108f7cb1dbc762b8a6 upstream.  It
broke the build for alpha and that can't be fixed without backporting
other more intrusive y2038 changes.

This was not a completely clean revert as the affected code in
getrusage() was moved by subsequent changes.

Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9bc1f179
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -964,7 +964,7 @@ put_tv32(struct timeval32 __user *o, struct timespec64 *i)
}

static inline long
put_tv_to_tv32(struct timeval32 __user *o, struct __kernel_old_timeval *i)
put_tv_to_tv32(struct timeval32 __user *o, struct timeval *i)
{
	return copy_to_user(o, &(struct timeval32){
				.tv_sec = i->tv_sec,
+2 −2
Original line number Diff line number Diff line
@@ -22,8 +22,8 @@
#define	RUSAGE_THREAD	1		/* only the calling thread */

struct	rusage {
	struct __kernel_old_timeval ru_utime;	/* user time used */
	struct __kernel_old_timeval ru_stime;	/* system time used */
	struct timeval ru_utime;	/* user time used */
	struct timeval ru_stime;	/* system time used */
	__kernel_long_t	ru_maxrss;	/* maximum resident set size */
	__kernel_long_t	ru_ixrss;	/* integral shared memory size */
	__kernel_long_t	ru_idrss;	/* integral unshared data size */
+2 −2
Original line number Diff line number Diff line
@@ -1795,8 +1795,8 @@ void getrusage(struct task_struct *p, int who, struct rusage *r)

out_children:
	r->ru_maxrss = maxrss * (PAGE_SIZE / 1024); /* convert pages to KBs */
	r->ru_utime = ns_to_kernel_old_timeval(utime);
	r->ru_stime = ns_to_kernel_old_timeval(stime);
	r->ru_utime = ns_to_timeval(utime);
	r->ru_stime = ns_to_timeval(stime);
}

SYSCALL_DEFINE2(getrusage, int, who, struct rusage __user *, ru)