Thread (3 messages) 3 messages, 2 authors, 2018-08-30

Re: [PATCH net-next 5/5] ppp: handle PPPIOCGIDLE for 64-bit time_t

From: Arnd Bergmann <arnd@arndb.de>
Date: 2018-08-30 11:47:57
Also in: lkml, netdev

On Thu, Aug 30, 2018 at 1:06 PM Guillaume Nault [off-list ref] wrote:
On Wed, Aug 29, 2018 at 04:03:30PM +0200, Arnd Bergmann wrote:
quoted
@@ -743,10 +744,17 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
              err = 0;
              break;

-     case PPPIOCGIDLE:
-             idle.xmit_idle = (jiffies - ppp->last_xmit) / HZ;
-             idle.recv_idle = (jiffies - ppp->last_recv) / HZ;
-             if (copy_to_user(argp, &idle, sizeof(idle)))
+     case PPPIOCGIDLE32:
+                idle32.xmit_idle = (jiffies - ppp->last_xmit) / HZ;
+                idle32.recv_idle = (jiffies - ppp->last_recv) / HZ;
+                if (copy_to_user(argp, &idle32, sizeof(idle32)))
Missing 'break;'
quoted
+             err = 0;
+             break;
+
+     case PPPIOCGIDLE64:
+             idle64.xmit_idle = (jiffies - ppp->last_xmit) / HZ;
+             idle64.recv_idle = (jiffies - ppp->last_recv) / HZ;
+             if (copy_to_user(argp, &idle32, sizeof(idle32)))
I guess you meant 'idle64' instead of 'idle32'.
Good catch, fixing up both now.

Thanks for the review!

     Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help