From: Al Viro Date: Sun, 31 Mar 2013 17:50:52 +0000 (-0400) Subject: scsi_proc: make proc_scsi_host_open() preallocate a bigger buffer X-Git-Tag: upstream/snapshot3+hdmi~5227^2~111 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=859d22f9c3924ab87b05ded8ba922abc298c1d43;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git scsi_proc: make proc_scsi_host_open() preallocate a bigger buffer Some of the ->show_info() instances really spew a lot; it's not a problem wrt correctness (seq_read() will grow buffer and call the sucker again), but in this case it makes sense to start with a somewhat bigger one - they often do exceed one page worth of output. Signed-off-by: Al Viro --- diff --git a/drivers/scsi/scsi_proc.c b/drivers/scsi/scsi_proc.c index 1670ba7..1eb34c3 100644 --- a/drivers/scsi/scsi_proc.c +++ b/drivers/scsi/scsi_proc.c @@ -78,7 +78,8 @@ static int proc_scsi_show(struct seq_file *m, void *v) static int proc_scsi_host_open(struct inode *inode, struct file *file) { - return single_open(file, proc_scsi_show, PDE(inode)->data); + return single_open_size(file, proc_scsi_show, PDE(inode)->data, + 4 * PAGE_SIZE); } static const struct file_operations proc_scsi_fops = {