Re: netlink: Add netlink_bound helper and use it in netlink_getname

From: Herbert Xu
Date: Sat Sep 26 2015 - 15:56:13 EST


On Sat, Sep 26, 2015 at 03:52:45PM -0400, Tejun Heo wrote:
>
> Ah, yeah, you're right. We need to check that there because it may
> contain a garbage value. I still think it'd better to use
> netlink_bound() test in connect() too tho.

Well I disagree. When I say that it returns to user-space I really
mean that the next time we use portid via the same call path that
triggered the connect we must be checking nlk->bound anyway.

Good luck finding more bugs in this code :)

Cheers,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/