Netdev List
 help / color / mirror / Atom feed
From: Krzysztof Halasa <khc@pm.waw.pl>
To: David Miller <davem@davemloft.net>
Cc: akpm@linux-foundation.org, netdev@vger.kernel.org,
	bugme-daemon@bugzilla.kernel.org, loveminix@yahoo.com.cn
Subject: Re: [Bugme-new] [Bug 8107] New: dev->header_cache_update has a random value
Date: Sat, 03 Mar 2007 00:38:23 +0100	[thread overview]
Message-ID: <m3bqjb6wsw.fsf@maximus.localdomain> (raw)
In-Reply-To: <20070302.112325.39160082.davem@davemloft.net> (David Miller's message of "Fri, 02 Mar 2007 11:23:25 -0800 (PST)")

David Miller <davem@davemloft.net> writes:

> I disagree, you can't leave dangling references to functions
> which are potentially inside of unloaded modules, as this code
> does.

All such pointers were thought to be initialized by all HDLC protocol
handlers before device activation, but they were actually used by the
hdlc* code, and this one doesn't seem to...

> Rather, HDLC Cisco should implement a proper protocol destructor
> method to clean up these function pointers.

No, it wouldn't work - hdlc_cisco doesn't use it at all, it's just
a victim. But now I think there may be other victims.

It seems the only way to become non-NULL is through ether_setup()
from hdlc_raw_eth.c (Ethernet framing over HDLC).

I think it's best to NULLify it and the like in hdlc.c
unconditionally, it's slow path and we don't need another useless
EXPORT_SYMBOL(s). It would fix all such problems forever.

Compile-tested only but it seems pretty obvious and of course I check
if the packets still flow after regular kernel upgrades (and I run
automatic tests checking all protos except X.25 from time to time as
well).

(the patch is in the next message).

Not sure if 2.6.21 material.
-- 
Krzysztof Halasa

      parent reply	other threads:[~2007-03-02 23:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200703011933.l21JX5hw018666@fire-2.osdl.org>
2007-03-01 22:34 ` [Bugme-new] [Bug 8107] New: dev->header_cache_update has a random value Andrew Morton
2007-03-01 22:37   ` Stephen Hemminger
2007-03-01 22:54     ` Andrew Morton
2007-03-01 23:30       ` Stephen Hemminger
2007-03-02  1:38         ` David Miller
2007-03-02  1:33     ` David Miller
2007-03-02 15:29   ` Krzysztof Halasa
2007-03-02 19:23     ` David Miller
2007-03-02 23:38       ` Krzysztof Halasa
2007-03-02 23:43         ` David Miller
2007-03-02 23:38       ` Krzysztof Halasa [this message]

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=m3bqjb6wsw.fsf@maximus.localdomain \
    --to=khc@pm.waw.pl \
    --cc=akpm@linux-foundation.org \
    --cc=bugme-daemon@bugzilla.kernel.org \
    --cc=davem@davemloft.net \
    --cc=loveminix@yahoo.com.cn \
    --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