lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKohponPJO+RGaCG8HC9d3iNKhV35Ss33XAdcQ6qus5ybeDuTQ@mail.gmail.com>
Date:	Wed, 9 Jul 2014 20:53:51 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Chris Redpath <Chris.Redpath@....com>
Cc:	"tglx@...utronix.de" <tglx@...utronix.de>,
	"linaro-kernel@...ts.linaro.org" <linaro-kernel@...ts.linaro.org>,
	"fweisbec@...il.com" <fweisbec@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"preeti@...ux.vnet.ibm.com" <preeti@...ux.vnet.ibm.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Arvind Chauhan <Arvind.Chauhan@....com>,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: [RFC 7/7] net: don't check for active hrtimer after adding it

On 9 July 2014 16:14, Viresh Kumar <viresh.kumar@...aro.org> wrote:
> Yeah, it looks like we can get rid of this. Also,
>
>         } while (t.task && pkt_dev->running && !signal_pending(current));
>
> is present in the closing "}" of do-while loop and probably we
> don't need to check t.task here as well.

Actually No. t.task is modified from hrtimer handler and so this check
would stay:

Diff I have added to this patch:

diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index f911acd..cc2694e 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2187,8 +2187,7 @@ static void spin(struct pktgen_dev *pkt_dev,
ktime_t spin_until)
                        set_current_state(TASK_INTERRUPTIBLE);
                        hrtimer_start_expires(&t.timer, HRTIMER_MODE_ABS);

-                       if (likely(t.task))
-                               schedule();
+                       schedule();

                        hrtimer_cancel(&t.timer);
                } while (t.task && pkt_dev->running &&
!signal_pending(current));
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ