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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110314150227.GJ333@e-circ.dyndns.org>
Date:	Mon, 14 Mar 2011 16:02:27 +0100
From:	Kurt Van Dijck <kurt.van.dijck@....be>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	socketcan-core@...ts.berlios.de, netdev@...r.kernel.org
Subject: Re: [RFC v3 3/6] can: make struct proto const

On Mon, Mar 14, 2011 at 03:09:15PM +0100, Eric Dumazet wrote:
> Le lundi 14 mars 2011 à 14:47 +0100, Kurt Van Dijck a écrit :
> > can_ioctl is the only reason for struct proto to be non-const.
> > script/check-patch.pl suggests struct proto be const.
> > This patch performs the necessary change.
> > 
> >  static void can_sock_destruct(struct sock *sk)
> >  {
> > @@ -720,10 +721,6 @@ int can_proto_register(const struct can_proto *cp)
> >  		err = -EBUSY;
> >  	} else {
> >  		proto_tab[proto] = cp;
> > -
> > -		/* use generic ioctl function if not defined by module */
> > -		if (!cp->ops->ioctl)
> > -			cp->ops->ioctl = can_ioctl;
> 
> Hmm, you actually fixed a race / bug, since we installed in proto_tab[]
> a pointer to a not yet initted ops structure.
I see your point.
The reason I modified this was, as described, checkpatch.pl was complaining.
Anyway, this sequence was protected by a spinlock 'proto_tab_lock'.
I don't think it was a race.

Did I miss something?
Kurt
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ