The patch titled wan: protect HDLC proto list while insmod/rmmod has been removed from the -mm tree. Its filename was wan-protect-hdlc-proto-list-while-insmod-rmmod.patch This patch was dropped because it was merged into mainline or a subsystem tree The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: wan: protect HDLC proto list while insmod/rmmod From: Krzysztof Halasa <khc@xxxxxxxxx> WAN: protect protocol list in hdlc.c with RTNL. Signed-off-by: Krzysztof Ha³asa <khc@xxxxxxxxx> Acked-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/net/wan/hdlc.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff -puN drivers/net/wan/hdlc.c~wan-protect-hdlc-proto-list-while-insmod-rmmod drivers/net/wan/hdlc.c --- a/drivers/net/wan/hdlc.c~wan-protect-hdlc-proto-list-while-insmod-rmmod +++ a/drivers/net/wan/hdlc.c @@ -43,8 +43,7 @@ static const char* version = "HDLC suppo #undef DEBUG_LINK -static struct hdlc_proto *first_proto = NULL; - +static struct hdlc_proto *first_proto; static int hdlc_change_mtu(struct net_device *dev, int new_mtu) { @@ -314,21 +313,25 @@ void detach_hdlc_protocol(struct net_dev void register_hdlc_protocol(struct hdlc_proto *proto) { + rtnl_lock(); proto->next = first_proto; first_proto = proto; + rtnl_unlock(); } void unregister_hdlc_protocol(struct hdlc_proto *proto) { - struct hdlc_proto **p = &first_proto; - while (*p) { - if (*p == proto) { - *p = proto->next; - return; - } + struct hdlc_proto **p; + + rtnl_lock(); + p = &first_proto; + while (*p != proto) { + BUG_ON(!*p); p = &((*p)->next); } + *p = proto->next; + rtnl_unlock(); } _ Patches currently in -mm which might be from khc@xxxxxxxxx are git-net.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html