Re: [PATCH] IB/core: type promotion bug in rdma_rw_init_one_mr()

Leon Romanovsky
2018-07-04T16:27:43Z

[-- Attachment #1: Type: text/plain, Size: 728 bytes --]

On Wed, Jul 04, 2018 at 08:49:47AM -0600, Jason Gunthorpe wrote:
> On Wed, Jul 04, 2018 at 12:55:41PM +0200, Håkon Bugge wrote:
> > Is:
> >
> > if (ret < (int)nents) {
> >
> > a more intuitive fix?
>
> That could lead to truncation/force negativeness of nents :(

IS_ERROR_VALUE() from include/linux/err.h?

>
> I wonder how many bugs like this we have.

Judging by the number of similar patches in netdev, I don't think
that we will have many "bugs", but maybe I'm wrong about it.

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]