On Tue, Jun 2, 2015, at 17:13, Denis Kirjanov wrote: > On 6/2/15, Hannes Frederic Sowa <han...@stressinduktion.org> wrote: > > Hello, > > > > On Tue, Jun 2, 2015, at 14:21, Denis Kirjanov wrote: > >> Perform the address length check first, before calling > >> the proto specific bind() function > > > > Can you give more detail why you did this change and what bug it fixes? > I've sent the v2 version with the net-next tag. The idea is simple: > check the error condition first and then do the useful work.
Hmm, IMHO the specific proto->bind handlers have to take care of the check themselves. You could argue that we should do the checks always in inet_bind but then you have to remove the addr_len checks from the raw and ping bind handlers, otherwise people become confused if they modify the code. I am in favor of leaving the current logic as is, sorry. Thanks, Hannes -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html