Commit dcf9867e authored by Nathan Scott's avatar Nathan Scott Committed by Nathan Scott

[XFS] sparse: annotate source for user pointers. From Chris Wedgwood.

SGI Modid: xfs-linux:xfs-kern:174337a
Signed-off-by: default avatarNathan Scott <nathans@sgi.com>
parent 6a3eaa1e
......@@ -95,7 +95,7 @@ extern int xfs_acl_vremove(struct vnode *vp, int);
#define _ACL_XFS_IACCESS(i,m,c) (XFS_IFORK_Q(i) ? xfs_acl_iaccess(i,m,c) : -1)
#define _ACL_ALLOC(a) ((a) = kmem_zone_alloc(xfs_acl_zone, KM_SLEEP))
#define _ACL_FREE(a) ((a)? kmem_zone_free(xfs_acl_zone, (a)) : 0)
#define _ACL_FREE(a) ((a)? kmem_zone_free(xfs_acl_zone, (a)):(void)0)
#else
#define xfs_acl_zone_init(zone,name)
......
......@@ -5478,7 +5478,7 @@ int /* error code */
xfs_getbmap(
bhv_desc_t *bdp, /* XFS behavior descriptor*/
struct getbmap *bmv, /* user bmap structure */
void *ap, /* pointer to user's array */
void __user *ap, /* pointer to user's array */
int interface) /* interface flags */
{
__int64_t bmvend; /* last block requested */
......@@ -5667,8 +5667,8 @@ xfs_getbmap(
(__int64_t)(bmvend - bmv->bmv_offset));
bmv->bmv_entries++;
ap = (interface & BMV_IF_EXTENDED) ?
(void *)((struct getbmapx *)ap + 1) :
(void *)((struct getbmap *)ap + 1);
(void __user *)((struct getbmapx __user *)ap + 1) :
(void __user *)((struct getbmap __user *)ap + 1);
}
}
} while (nmap && nexleft && bmv->bmv_length);
......
......@@ -328,7 +328,7 @@ int /* error code */
xfs_getbmap(
bhv_desc_t *bdp, /* XFS behavior descriptor*/
struct getbmap *bmv, /* user bmap structure */
void *ap, /* pointer to user's array */
void __user *ap, /* pointer to user's array */
int iflags); /* interface flags */
/*
......
......@@ -65,7 +65,7 @@
*/
int
xfs_swapext(
xfs_swapext_t *sxp)
xfs_swapext_t __user *sxp)
{
xfs_swapext_t sx;
xfs_inode_t *ip=NULL, *tip=NULL, *ips[2];
......
......@@ -60,7 +60,7 @@ typedef struct xfs_swapext
/*
* Syscall interface for xfs_swapext
*/
int xfs_swapext(struct xfs_swapext *sx);
int xfs_swapext(struct xfs_swapext __user *sx);
#endif /* __KERNEL__ */
......
......@@ -313,10 +313,10 @@ typedef struct xfs_bstat {
* The user-level BulkStat Request interface structure.
*/
typedef struct xfs_fsop_bulkreq {
__u64 *lastip; /* last inode # pointer */
__u64 __user *lastip; /* last inode # pointer */
__s32 icount; /* count of entries in buffer */
void *ubuffer; /* user buffer for inode desc. */
__s32 *ocount; /* output count pointer */
void __user *ubuffer; /* user buffer for inode desc. */
__s32 __user *ocount; /* output count pointer */
} xfs_fsop_bulkreq_t;
......@@ -344,12 +344,12 @@ typedef struct xfs_error_injection {
*/
typedef struct xfs_fsop_handlereq {
__u32 fd; /* fd for FD_TO_HANDLE */
void *path; /* user pathname */
void __user *path; /* user pathname */
__u32 oflags; /* open flags */
void *ihandle; /* user supplied handle */
void __user *ihandle; /* user supplied handle */
__u32 ihandlen; /* user supplied length */
void *ohandle; /* user buffer for handle */
__u32 *ohandlen; /* user buffer length */
void __user *ohandle; /* user buffer for handle */
__u32 __user *ohandlen; /* user buffer length */
} xfs_fsop_handlereq_t;
/*
......@@ -361,7 +361,7 @@ typedef struct xfs_fsop_handlereq {
typedef struct xfs_fsop_setdm_handlereq {
struct xfs_fsop_handlereq hreq; /* handle interface structure */
struct fsdmidata *data; /* DMAPI data to set */
struct fsdmidata __user *data; /* DMAPI data to set */
} xfs_fsop_setdm_handlereq_t;
typedef struct xfs_attrlist_cursor {
......@@ -388,7 +388,7 @@ typedef struct xfs_attr_multiop {
typedef struct xfs_fsop_attrmulti_handlereq {
struct xfs_fsop_handlereq hreq; /* handle interface structure */
__u32 opcount; /* count of following multiop */
struct xfs_attr_multiop *ops; /* attr_multi data to get/set */
struct xfs_attr_multiop __user *ops; /* attr_multi data to get/set */
} xfs_fsop_attrmulti_handlereq_t;
/*
......
......@@ -68,7 +68,7 @@ int /* error status */
xfs_bulkstat_one(
xfs_mount_t *mp, /* mount point for filesystem */
xfs_ino_t ino, /* inode number to get data for */
void *buffer, /* buffer to place output in */
char __user *buffer, /* buffer to place output in */
int ubsize, /* size of buffer */
void *private_data, /* my private data */
xfs_daddr_t bno, /* starting bno of inode cluster */
......@@ -231,7 +231,7 @@ xfs_bulkstat(
bulkstat_one_pf formatter, /* func that'd fill a single buf */
void *private_data,/* private data for formatter */
size_t statstruct_size, /* sizeof struct filling */
xfs_caddr_t ubuffer, /* buffer with inode stats */
char __user *ubuffer, /* buffer with inode stats */
int flags, /* defined in xfs_itable.h */
int *done) /* 1 if there're more stats to get */
{
......@@ -265,7 +265,7 @@ xfs_bulkstat(
int tmp; /* result value from btree calls */
int ubcount; /* size of user's buffer */
int ubleft; /* bytes left in user's buffer */
xfs_caddr_t ubufp; /* current pointer into user's buffer */
char __user *ubufp; /* current pointer into user's buffer */
int ubelem; /* spaces used in user's buffer */
int ubused; /* bytes used by formatter */
xfs_buf_t *bp; /* ptr to on-disk inode cluster buf */
......@@ -633,7 +633,7 @@ int /* error status */
xfs_bulkstat_single(
xfs_mount_t *mp, /* mount point for filesystem */
xfs_ino_t *lastinop, /* inode to return */
xfs_caddr_t buffer, /* buffer with inode stats */
char __user *buffer,/* buffer with inode stats */
int *done) /* 1 if there're more stats to get */
{
int count; /* count value for bulkstat call */
......@@ -682,7 +682,7 @@ xfs_inumbers(
xfs_mount_t *mp, /* mount point for filesystem */
xfs_ino_t *lastino, /* last inode returned */
int *count, /* size of buffer/count returned */
xfs_caddr_t ubuffer) /* buffer with inode descriptions */
xfs_inogrp_t __user *ubuffer) /* buffer with inode descriptions */
{
xfs_buf_t *agbp;
xfs_agino_t agino;
......@@ -766,7 +766,7 @@ xfs_inumbers(
error = XFS_ERROR(EFAULT);
break;
}
ubuffer += bufidx * sizeof(*buffer);
ubuffer += bufidx;
*count += bufidx;
bufidx = 0;
}
......
......@@ -40,7 +40,7 @@
*/
typedef int (*bulkstat_one_pf)(struct xfs_mount *mp,
xfs_ino_t ino,
void *buffer,
char __user *buffer,
int ubsize,
void *private_data,
xfs_daddr_t bno,
......@@ -73,7 +73,7 @@ xfs_bulkstat(
bulkstat_one_pf formatter, /* func that'd fill a single buf */
void *private_data, /* private data for formatter */
size_t statstruct_size,/* sizeof struct that we're filling */
xfs_caddr_t ubuffer, /* buffer with inode stats */
char __user *ubuffer, /* buffer with inode stats */
int flags, /* flag to control access method */
int *done); /* 1 if there're more stats to get */
......@@ -81,14 +81,14 @@ int
xfs_bulkstat_single(
xfs_mount_t *mp,
xfs_ino_t *lastinop,
xfs_caddr_t buffer,
char __user *buffer,
int *done);
int
xfs_bulkstat_one(
xfs_mount_t *mp,
xfs_ino_t ino,
void *buffer,
char __user *buffer,
int ubsize,
void *private_data,
xfs_daddr_t bno,
......@@ -101,6 +101,6 @@ xfs_inumbers(
xfs_mount_t *mp, /* mount point for filesystem */
xfs_ino_t *last, /* last inode returned */
int *count, /* size of buffer/count returned */
xfs_caddr_t buffer);/* buffer with inode descriptions */
xfs_inogrp_t __user *buffer);/* buffer with inode descriptions */
#endif /* __XFS_ITABLE_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment