Re: 2.6.18-rc1-mm1

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

 



On Sun, 9 Jul 2006 13:02:48 +0200
"Michal Piotrowski" <[email protected]> wrote:

> TP hangs on
> 
> <<<test_output>>>
> setrlimit01    1  PASS  :  RLIMIT_NOFILE functionality is correct
> setrlimit01    0  WARN  :  caught signal 2, not SIGSEGV
> <<<execution_status>>>
> duration=1071 termination_type=driver_interrupt termination_id=1 corefile=no
> cutime=0 cstime=1
> <<<test_end>>>

Yep, thanks.


RLIMIT_FSIZE can cause generic_write_checks() to reduce `count'.  So we cannot
assume that `count' is equal to the total length size of the incoming iovec.

--- a/mm/filemap.c~add-address_space_operationsbatch_write-fix
+++ a/mm/filemap.c
@@ -2205,9 +2205,9 @@ generic_file_buffered_write(struct kiocb
 	do {
 		/* do not walk over current segment */
 		desc.buf = cur_iov->iov_base + iov_base;
-		desc.count = cur_iov->iov_len - iov_base;
+		desc.count = min(count, cur_iov->iov_len - iov_base);
 		if (desc.count > 0)
-			status = batch_write(file, &desc, &copied);
+			status = (*batch_write)(file, &desc, &copied);
 		else {
 			copied = 0;
 			status = 0;
_

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux