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] [day] [month] [year] [list]
Date:	Sat, 04 Aug 2007 01:42:38 +0200
From:	Krzysztof Halasa <khc@...waw.pl>
To:	Yoann Padioleau <padator@...adoo.fr>
Cc:	Jeff Garzik <jeff@...zik.org>, kernel-janitors@...r.kernel.org,
	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: dev->priv to netdev_priv(dev)

Yoann Padioleau <padator@...adoo.fr> writes:

> drivers/net/wan/hdlc_fr.c               

hdlc_fr (PVC device) uses dev->priv for N:1 mappings (a single pvc
structure may be referenced as dev->priv by multiple (up to 2
currently) PVC devs).

> drivers/net/wan/hdlc_ppp.c              

hdlc_ppp obviously has to do some tricks to use syncppp:
static int ppp_open(struct net_device *dev)
{
        hdlc_device *hdlc = dev_to_hdlc(dev);
        void *old_ioctl;
        int result;

        dev->priv = &state(hdlc)->syncppp_ptr;
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        state(hdlc)->syncppp_ptr = &state(hdlc)->pppdev;
        state(hdlc)->pppdev.dev = dev;

        old_ioctl = dev->do_ioctl;
        state(hdlc)->old_change_mtu = dev->change_mtu;
        sppp_attach(&state(hdlc)->pppdev);

Perhaps I should remove that and make a sane interface in syncppp.
-- 
Krzysztof Halasa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ