Re: [PATCH 06/16] fs: fix kernel_write prototype

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

 



On Wed, Aug 30, 2017 at 04:59:57PM +0200, Christoph Hellwig wrote:

>  	for (prot = 0; prot < prot_length;) {
>  		sector_t len = min_t(sector_t, bufsize, prot_length - prot);
> -		ssize_t ret = kernel_write(prot_fd, buf, len, pos + prot);
> +		ssize_t ret = kernel_write(prot_fd, buf, len, &pos);
>  
>  		if (ret != len) {
>  			pr_err("vfs_write to prot file failed: %zd\n", ret);
>  			return ret < 0 ? ret : -ENODEV;
>  		}
> -		prot += ret;
>  	}

And that loop will terminate because of...?  IOW, the same bug class as in
the kernel_read() patch.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux