nilfs2: check size of array structured data exchanged via ioctls
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Mon, 11 May 2009 14:24:47 +0000 (23:24 +0900)
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Mon, 11 May 2009 16:48:54 +0000 (01:48 +0900)
commit83aca8f480fcd2d9748301a5d060cf947dc75b94
tree008c96d1017b835e3d54344c0a2c77d780086979
parent4f6b828837b4e3836f2c9ac2f0eab9773b6c1327
nilfs2: check size of array structured data exchanged via ioctls

Although some ioctls of nilfs2 exchange data in the form of indirectly
referenced array, some of them lack size check on the array elements.

This inserts the missing checks and rejects requests if data of ioctl
does not have a valid format.

We usually don't have to check size of structures that we associated
with ioctl commands because the size is tested implicitly for
identifying ioctl command; the checks this patch adds are for the
cases where the implicit check is not applied.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
fs/nilfs2/ioctl.c