Re: [RFC 15/22] tcm: Add FILEIO subsystem plugin

From: Fubo Chen
Date: Mon Sep 20 2010 - 12:18:27 EST


On Mon, Aug 30, 2010 at 11:22 AM, Nicholas A. Bellinger
<nab@xxxxxxxxxxxxxxx> wrote:
> From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
>
> This patch adds the O_SYNC FILEIO subsystem plugin for accessing struct file
> using Linux/VFS struct file_operations.  It also includes WriteCache and FUA
> Write Emulation support to struct file using fs/sync.c/vfs_fsync_range()
>
> Signed-off-by: Nicholas A. Bellinger <nab@xxxxxxxxxxxxxxx>
>
> [ ... ]
>
> +static int fd_do_writev(struct fd_request *req, struct se_task *task)
> +{
> +       struct file *fd = req->fd_dev->fd_file;
> +       struct scatterlist *sg = task->task_sg;
> +       struct iovec iov[req->fd_sg_count];

Kernel stack size is 8 KB. On a 64-bit system struct iovec takes 16
bytes. What happens if req->fd_sg_count is large ? Kernel crash ?

Fubo.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/