From 422d6acf0c6439e2f285eded6b198865e26329fb Mon Sep 17 00:00:00 2001 From: Jody McIntyre <scjody@modernduck.com> Date: Sun, 30 Jan 2005 15:08:05 -0500 Subject: [PATCH] Fixed removal of old partial datagrams. Since max_partial_datagrams can be changed at runtime, there may be _more_ than max_partial_datagrams in the list. Also removed obsolote comment. Signed-off-by: Jody McIntyre <scjody@modernduck.com> --- drivers/ieee1394/eth1394.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c index 991f944b8472..592ecb6d62d8 100644 --- a/drivers/ieee1394/eth1394.c +++ b/drivers/ieee1394/eth1394.c @@ -165,8 +165,7 @@ MODULE_LICENSE("GPL"); /* The max_partial_datagrams parameter is the maximum number of fragmented * datagrams per node that eth1394 will keep in memory. Providing an upper * bound allows us to limit the amount of memory that partial datagrams - * consume in the event that some partial datagrams are never completed. This - * should probably change to a sysctl item or the like if possible. + * consume in the event that some partial datagrams are never completed. */ static int max_partial_datagrams = 25; module_param(max_partial_datagrams, int, S_IRUGO | S_IWUSR); @@ -1187,7 +1186,7 @@ static int ether1394_data_handler(struct net_device *dev, int srcid, int destid, lh = find_partial_datagram(pdgl, dgl); if (lh == NULL) { - if (pdg->sz == max_partial_datagrams) { + while (pdg->sz >= max_partial_datagrams) { /* remove the oldest */ purge_partial_datagram(pdgl->prev); pdg->sz--; -- 2.30.9