Re: [PATCH 3/8] xfs: handle kmalloc failure when reading attrs

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

 



I think the subject should be more like:

xfs: fallback to vmalloc for large buffers in xfs_attrmulti_attr_get

> +	kbuf = kmem_zalloc(*len, KM_SLEEP | KM_MAYFAIL);
> +	if (!kbuf) {
> +		kbuf = kmem_zalloc_large(*len);
> +		if (!kbuf)
> +			return ENOMEM;
> +	}
>  
>  	error = xfs_attr_get(XFS_I(inode), name, kbuf, (int *)len, flags);
>  	if (error)
> @@ -457,7 +460,7 @@ xfs_attrmulti_attr_get(
>  		error = EFAULT;
>  
>   out_kfree:
> -	kfree(kbuf);
> +	kmem_free(kbuf);

kmem_free doesn't handle vmalloced buffers from kmem_zalloc_large, you
need to use kmem_free_large for them.

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux