Re: [PATCH net 1/1] hv_netvsc: Fix missed pagebuf entries in netvsc_dma_map/unmap()

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

 



On Mon, 30 Jan 2023 19:33:06 -0800 Michael Kelley wrote:
> @@ -990,9 +987,7 @@ static int netvsc_dma_map(struct hv_device *hv_dev,
>  			  struct hv_netvsc_packet *packet,
>  			  struct hv_page_buffer *pb)
>  {
> -	u32 page_count =  packet->cp_partial ?
> -		packet->page_buf_cnt - packet->rmsg_pgcnt :
> -		packet->page_buf_cnt;
> +	u32 page_count = packet->page_buf_cnt;
>  	dma_addr_t dma;
>  	int i;

Suspiciously, the caller still does:

                if (packet->cp_partial)
                        pb += packet->rmsg_pgcnt;

                ret = netvsc_dma_map(ndev_ctx->device_ctx, packet, pb);

Shouldn't that if () pb +=... also go away?



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux