mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Eric Dumazet <dada1@cosmosbay.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Kernel Testers List <kernel-testers@vger.kernel.org>,
	"Alexander V. Lukyanov" <lav@yar.ru>,
	Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: [Bug #13339] rtable leak in ipv4/route.c
Date: Tue, 26 May 2009 01:28:34 +0200	[thread overview]
Message-ID: <200905260128.35541.rjw@sisk.pl> (raw)
In-Reply-To: <4A19CB7D.8000004@cosmosbay.com>

On Monday 25 May 2009, Eric Dumazet wrote:
> Rafael J. Wysocki a écrit :
> > This message has been generated automatically as a part of a report
> > of recent regressions.
> > 
> > The following bug entry is on the current list of known regressions
> > from 2.6.29.  Please verify if it still should be listed and let me know
> > (either way).
> > 
> > 
> > Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=13339
> > Subject		: rtable leak in ipv4/route.c
> > Submitter	: Alexander V. Lukyanov <lav@yar.ru>
> > Date		: 2009-05-18 14:10 (7 days old)
> > 
> 
> Bug was present in 2.6.29, so its a regression from 2.6.28
> 
> It is solved and available in David tree (net-2.6), and scheduled for stable submission
> 
> commit 1ddbcb005c395518c2cd0df504cff3d4b5c85853
> net: fix rtable leak in net/ipv4/route.c
> 
> Alexander V. Lukyanov found a regression in 2.6.29 and made a complete
> analysis found in http://bugzilla.kernel.org/show_bug.cgi?id=13339
> Quoted here because its a perfect one :
> 
> begin_of_quotation
>  2.6.29 patch has introduced flexible route cache rebuilding. Unfortunately the
>  patch has at least one critical flaw, and another problem.
> 
>  rt_intern_hash calculates rthi pointer, which is later used for new entry
>  insertion. The same loop calculates cand pointer which is used to clean the
>  list. If the pointers are the same, rtable leak occurs, as first the cand is
>  removed then the new entry is appended to it.
> 
>  This leak leads to unregister_netdevice problem (usage count > 0).
> 
>  Another problem of the patch is that it tries to insert the entries in certain
>  order, to facilitate counting of entries distinct by all but QoS parameters.
>  Unfortunately, referencing an existing rtable entry moves it to list beginning,
>  to speed up further lookups, so the carefully built order is destroyed.
> 
>  For the first problem the simplest patch it to set rthi=0 when rthi==cand, but
>  it will also destroy the ordering.
> end_of_quotation
> 
> Problematic commit is 1080d709fb9d8cd4392f93476ee46a9d6ea05a5b
> (net: implement emergency route cache rebulds when gc_elasticity is exceeded)
> 
> Trying to keep dst_entries ordered is too complex and breaks the fact that
> order should depend on the frequency of use for garbage collection.
> 
> A possible fix is to make rt_intern_hash() simpler, and only makes
> rt_check_expire() a litle bit smarter, being able to cope with an arbitrary
> entries order. The added loop is running on cache hot data, while cpu
> is prefetching next object, so should be unnoticied.
> 
> Reported-and-analyzed-by: Alexander V. Lukyanov <lav@yar.ru>
> Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
> Acked-by: Neil Horman <nhorman@tuxdriver.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>

Thanks, updated.

Rafael

  reply	other threads:[~2009-05-25 23:28 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-24 19:06 2.6.30-rc7: Reported regressions from 2.6.29 Rafael J. Wysocki
2009-05-24 19:06 ` [Bug #13109] High latency on /sys/class/thermal Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13119] Trouble with make-install from a NFS mount Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13121] Buggy _BCM - acer aspire 5720G, 5710Z, 5315 Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13125] active uvcvideo breaks over suspend Rafael J. Wysocki
2009-05-25  9:56   ` Alan Jenkins
2009-05-25 23:17     ` Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13126] BUG: MAX_LOCKDEP_ENTRIES too low! when mounting rootfs Rafael J. Wysocki
2009-05-25  8:21   ` Peter Zijlstra
2009-05-25 23:19     ` Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13116] Can't boot with nosmp Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13148] resume after suspend-to-ram broken on Sony Vaio VGN-SR19VN when sony-laptop driver present Rafael J. Wysocki
2009-05-24 22:53   ` Mattia Dongili
2009-05-25 23:22     ` Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13179] CD-R: wodim intermittent failures Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13171] 2.6.30-rc2 + xorg-intel-2.7.0 + DRM_I915_KMS = corruption Rafael J. Wysocki
2009-05-25  8:51   ` Alex Bennee
2009-05-24 19:11 ` [Bug #13250] Side channel of Intel HDA chip doesn't work anymore, did work with 2.6.29 Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13219] Since kernel 2.6.30-rc1, computers hangs randomly Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13245] possible circular locking dependency detected Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13180] 2.6.30-rc2: WARNING at i915_gem.c for i915_gem_idle Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13285] INTELFB: Colors display incorrectly Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13293] Kernel BUG under network load with gianfar Rafael J. Wysocki
2009-05-25  1:42   ` Lennert Buytenhek
2009-05-24 19:11 ` [Bug #13277] Thinkpad X40 no longer resumes reliable since ff69f2bba67bd45514923aaedbf40fe351787c59 Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13323] 2.6.30-rc deadline scheduler performance regression for iozone over NFS Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13319] Page allocation failures with b43 and p54usb Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13318] AGP doesn't work anymore on nforce2 Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13306] hibernate slow on _second_ run Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13326] [PATCH]Null pointer dereference in rtc-cmos driver Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13325] 2.6.30-rc kills my box hard - and lockdep chains Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13328] b44: eth0: BUG! Timeout waiting for bit 00000002 of register 42c to clear Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13330] nfs4 NULL pointer dereference in _nfs4_do_setlk Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13341] Random Oops at boot at loading ip6tables rules Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13337] [post 2.6.29 regression] hang during suspend of b44/b43 modules Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13331] FUTEX_LOCK_PI kills kernel Rafael J. Wysocki
2009-05-25  8:24   ` Peter Zijlstra
2009-05-25 23:25     ` Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13339] rtable leak in ipv4/route.c Rafael J. Wysocki
2009-05-24 22:34   ` Eric Dumazet
2009-05-25 23:28     ` Rafael J. Wysocki [this message]
2009-05-24 19:11 ` [Bug #13377] Microphone no longer works on Toshiba Satellite A100 Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13374] reiserfs blocked for more than 120secs Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13373] fbcon, intelfb, i915: INFO: possible circular locking dependency detected Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13372] Oops in usb-serial with keyspan adapter Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13366] About 80% of shutdowns fail (blocking) Rafael J. Wysocki
2009-05-24 19:11 ` [Bug #13378] kernel/async.c broke pata_legacy.c Rafael J. Wysocki
2009-05-24 22:07 ` 2.6.30-rc7: Reported regressions from 2.6.29 Ozan Çağlayan
2009-05-24 22:20   ` Rafael J. Wysocki
2009-05-30 19:50 2.6.30-rc7-git4: Reported regressions 2.6.28 -> 2.6.29 Rafael J. Wysocki
2009-05-30 19:55 ` [Bug #13339] rtable leak in ipv4/route.c Rafael J. Wysocki
2009-06-07 10:02 2.6.30-rc8-git4: Reported regressions 2.6.28 -> 2.6.29 Rafael J. Wysocki
2009-06-07 10:06 ` [Bug #13339] rtable leak in ipv4/route.c Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200905260128.35541.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=dada1@cosmosbay.com \
    --cc=kernel-testers@vger.kernel.org \
    --cc=lav@yar.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome