Re: [PATCH] packet: Do not leak dev refcounts on error exit

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

 



On Tue, Jan 8, 2019 at 6:41 PM Jason Gunthorpe <jgg@xxxxxxxxxxxx> wrote:
>
> 'dev' is non NULL when the addr_len check triggers so it must goto a label
> that does the dev_put otherwise dev will have a leaked refcount.
>
> This bug causes the ib_ipoib module to become unloadable when using
> systemd-network as it triggers this check on InfiniBand links.
>
> Fixes: 99137b7888f4 ("packet: validate address length")
> Reported-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>

Acked-by: Willem de Bruijn <willemb@xxxxxxxxxx>

Argh, indeed. Thanks for the fix.



[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