Re: [PATCH v2] RDMA/ucma: Don't allow AF_IB in ucma_join_ip_multicast()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Ugh, this is a systemic mistake. Looks like every place in the uapi that uses
> struct sockaddr_in6 has this bug. Eg look at ucma_bind_ip
>
> I think I'd prefer to fix this via revising the API to
>
>  size_t rdma_addr_size_in6(struct sockaddr_in6 *addr)
>  size_t rdma_addr_size_kss(struct struct __kernel_sockaddr_storage *addr)
>
> And getting rid of all the dangerous (struct sockaddr *) casting at
> all the various call sites.
>
> The function will return 0 if the given storage is too small for the
> requested AF, or the AF is not supported.

Good idea.  I'll code that up.

 - R.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux