* RE: [PATCH] net/ip: Fix limit_time calculation in freeing old fragments
[not found] <1474989937-25559-1-git-send-email-sakar.arora@nxp.com>
@ 2016-10-12 11:25 ` Bhupesh Sharma
2016-10-13 3:23 ` Andrei Borzenkov
0 siblings, 1 reply; 4+ messages in thread
From: Bhupesh Sharma @ 2016-10-12 11:25 UTC (permalink / raw)
To: grub-devel@gnu.org; +Cc: Sakar Arora, Sakar Arora
Hi Grub maintainers,
Ping.
> -----Original Message-----
> From: Sakar Arora [mailto:sakar.arora@nxp.com]
> Sent: Tuesday, September 27, 2016 8:56 PM
> To: grub-devel@gnu.org
> Cc: Bhupesh Sharma <bhupesh.sharma@nxp.com>; Sakar Arora
> <sakar.arora@nxp.com>
> Subject: [PATCH] net/ip: Fix limit_time calculation in freeing old
> fragments
>
> From: Sakar Arora <Sakar.Arora@nxp.com>
>
> limit_time underflows when current time is less than 90000ms.
> This causes packet fragments received during this time, i.e., till
> 90000ms pass since timer init, to be rejected.
>
> Hence, set it to 0 if its less than 90000.
>
> Signed-off-by: Sakar Arora <Sakar.Arora@nxp.com>
> ---
> grub-core/net/ip.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/grub-core/net/ip.c b/grub-core/net/ip.c index
> 8c56baa..4dae207 100644
> --- a/grub-core/net/ip.c
> +++ b/grub-core/net/ip.c
> @@ -363,7 +363,9 @@ static void
> free_old_fragments (void)
> {
> struct reassemble *rsm, **prev;
> - grub_uint64_t limit_time = grub_get_time_ms () - 90000;
> + grub_uint64_t limit_time = grub_get_time_ms ();
> +
> + limit_time = (limit_time > 90000)?limit_time - 90000:0;
>
> for (prev = &reassembles, rsm = *prev; rsm; rsm = *prev)
> if (rsm->last_time < limit_time)
> --
> 1.9.1
Regards,
Bhupesh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net/ip: Fix limit_time calculation in freeing old fragments
2016-10-12 11:25 ` Bhupesh Sharma
@ 2016-10-13 3:23 ` Andrei Borzenkov
0 siblings, 0 replies; 4+ messages in thread
From: Andrei Borzenkov @ 2016-10-13 3:23 UTC (permalink / raw)
To: The development of GNU GRUB; +Cc: Sakar Arora
12.10.2016 14:25, Bhupesh Sharma пишет:
> Hi Grub maintainers,
>
> Ping.
>
>> -----Original Message-----
>> From: Sakar Arora [mailto:sakar.arora@nxp.com]
>> Sent: Tuesday, September 27, 2016 8:56 PM
>> To: grub-devel@gnu.org
>> Cc: Bhupesh Sharma <bhupesh.sharma@nxp.com>; Sakar Arora
>> <sakar.arora@nxp.com>
>> Subject: [PATCH] net/ip: Fix limit_time calculation in freeing old
>> fragments
>>
This message apparently was never delivered to list. Could you please
resend patch so it can be applied (e.g. as attachment)? Thank you.
>> From: Sakar Arora <Sakar.Arora@nxp.com>
>>
>> limit_time underflows when current time is less than 90000ms.
>> This causes packet fragments received during this time, i.e., till
>> 90000ms pass since timer init, to be rejected.
>>
>> Hence, set it to 0 if its less than 90000.
>>
>> Signed-off-by: Sakar Arora <Sakar.Arora@nxp.com>
>> ---
>> grub-core/net/ip.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/grub-core/net/ip.c b/grub-core/net/ip.c index
>> 8c56baa..4dae207 100644
>> --- a/grub-core/net/ip.c
>> +++ b/grub-core/net/ip.c
>> @@ -363,7 +363,9 @@ static void
>> free_old_fragments (void)
>> {
>> struct reassemble *rsm, **prev;
>> - grub_uint64_t limit_time = grub_get_time_ms () - 90000;
>> + grub_uint64_t limit_time = grub_get_time_ms ();
>> +
>> + limit_time = (limit_time > 90000)?limit_time - 90000:0;
>>
>> for (prev = &reassembles, rsm = *prev; rsm; rsm = *prev)
>> if (rsm->last_time < limit_time)
>> --
>> 1.9.1
>
> Regards,
> Bhupesh
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] net/ip: Fix limit_time calculation in freeing old fragments
[not found] <1476474982-7603-1-git-send-email-sakar.arora@nxp.com>
@ 2016-10-17 5:30 ` Sakar Arora
2016-10-18 17:27 ` Andrei Borzenkov
0 siblings, 1 reply; 4+ messages in thread
From: Sakar Arora @ 2016-10-17 5:30 UTC (permalink / raw)
To: Sakar Arora, grub-devel@gnu.org; +Cc: Bhupesh Sharma
[-- Attachment #1: Type: text/plain, Size: 1330 bytes --]
Hi
Sending the below mentioned patch as an attachment. Please review.
Thanks,
Sakar
-----Original Message-----
From: Sakar Arora [mailto:sakar.arora@nxp.com]
Sent: Saturday, October 15, 2016 1:26 AM
To: grub-devel@gnu.org
Cc: Bhupesh Sharma <bhupesh.sharma@nxp.com>; Sakar Arora <sakar.arora@nxp.com>
Subject: [PATCH] net/ip: Fix limit_time calculation in freeing old fragments
From: Sakar Arora <Sakar.Arora@nxp.com>
limit_time underflows when current time is less than 90000ms.
This causes packet fragments received during this time, i.e., till 90000ms pass since timer init, to be rejected.
Hence, set it to 0 if its less than 90000.
Signed-off-by: Sakar Arora <Sakar.Arora@nxp.com>
---
grub-core/net/ip.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/grub-core/net/ip.c b/grub-core/net/ip.c index 8c56baa..4dae207 100644
--- a/grub-core/net/ip.c
+++ b/grub-core/net/ip.c
@@ -363,7 +363,9 @@ static void
free_old_fragments (void)
{
struct reassemble *rsm, **prev;
- grub_uint64_t limit_time = grub_get_time_ms () - 90000;
+ grub_uint64_t limit_time = grub_get_time_ms ();
+
+ limit_time = (limit_time > 90000)?limit_time - 90000:0;
for (prev = &reassembles, rsm = *prev; rsm; rsm = *prev)
if (rsm->last_time < limit_time)
--
1.9.1
[-- Attachment #2: 0001-net-ip-Fix-limit_time-calculation-in-freeing-old-fra.patch --]
[-- Type: application/octet-stream, Size: 1091 bytes --]
From 2b2310b811a5b84f06bb3fc9dc014c54ff103311 Mon Sep 17 00:00:00 2001
From: Sakar Arora <Sakar.Arora@nxp.com>
Date: Tue, 20 Sep 2016 01:01:17 +0530
Subject: [PATCH] net/ip: Fix limit_time calculation in freeing old fragments
limit_time underflows when current time is less than 90000ms.
This causes packet fragments received during this time, i.e.,
till 90000ms pass since timer init, to be rejected.
Hence, set it to 0 if its less than 90000.
Signed-off-by: Sakar Arora <Sakar.Arora@nxp.com>
---
grub-core/net/ip.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/grub-core/net/ip.c b/grub-core/net/ip.c
index 8c56baa..4dae207 100644
--- a/grub-core/net/ip.c
+++ b/grub-core/net/ip.c
@@ -363,7 +363,9 @@ static void
free_old_fragments (void)
{
struct reassemble *rsm, **prev;
- grub_uint64_t limit_time = grub_get_time_ms () - 90000;
+ grub_uint64_t limit_time = grub_get_time_ms ();
+
+ limit_time = (limit_time > 90000)?limit_time - 90000:0;
for (prev = &reassembles, rsm = *prev; rsm; rsm = *prev)
if (rsm->last_time < limit_time)
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] net/ip: Fix limit_time calculation in freeing old fragments
2016-10-17 5:30 ` [PATCH] net/ip: Fix limit_time calculation in freeing old fragments Sakar Arora
@ 2016-10-18 17:27 ` Andrei Borzenkov
0 siblings, 0 replies; 4+ messages in thread
From: Andrei Borzenkov @ 2016-10-18 17:27 UTC (permalink / raw)
To: The development of GNU GRUB, Sakar Arora; +Cc: Bhupesh Sharma
Committed with trivial formatting change. Thank you!
17.10.2016 08:30, Sakar Arora пишет:
> Hi
>
> Sending the below mentioned patch as an attachment. Please review.
>
> Thanks,
> Sakar
>
> -----Original Message-----
> From: Sakar Arora [mailto:sakar.arora@nxp.com]
> Sent: Saturday, October 15, 2016 1:26 AM
> To: grub-devel@gnu.org
> Cc: Bhupesh Sharma <bhupesh.sharma@nxp.com>; Sakar Arora <sakar.arora@nxp.com>
> Subject: [PATCH] net/ip: Fix limit_time calculation in freeing old fragments
>
> From: Sakar Arora <Sakar.Arora@nxp.com>
>
> limit_time underflows when current time is less than 90000ms.
> This causes packet fragments received during this time, i.e., till 90000ms pass since timer init, to be rejected.
>
> Hence, set it to 0 if its less than 90000.
>
> Signed-off-by: Sakar Arora <Sakar.Arora@nxp.com>
> ---
> grub-core/net/ip.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/grub-core/net/ip.c b/grub-core/net/ip.c index 8c56baa..4dae207 100644
> --- a/grub-core/net/ip.c
> +++ b/grub-core/net/ip.c
> @@ -363,7 +363,9 @@ static void
> free_old_fragments (void)
> {
> struct reassemble *rsm, **prev;
> - grub_uint64_t limit_time = grub_get_time_ms () - 90000;
> + grub_uint64_t limit_time = grub_get_time_ms ();
> +
> + limit_time = (limit_time > 90000)?limit_time - 90000:0;
>
> for (prev = &reassembles, rsm = *prev; rsm; rsm = *prev)
> if (rsm->last_time < limit_time)
> --
> 1.9.1
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-10-18 17:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1476474982-7603-1-git-send-email-sakar.arora@nxp.com>
2016-10-17 5:30 ` [PATCH] net/ip: Fix limit_time calculation in freeing old fragments Sakar Arora
2016-10-18 17:27 ` Andrei Borzenkov
[not found] <1474989937-25559-1-git-send-email-sakar.arora@nxp.com>
2016-10-12 11:25 ` Bhupesh Sharma
2016-10-13 3:23 ` Andrei Borzenkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).