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

Re: VFS bug in 2.4.10+ which applies ulimits to block devices



On Nov 26, 2001  17:38 +0100, Andrea Arcangeli wrote:
> If you're sure the current semantics are wrong for blkdev feel free to
> add an IS_BLK check in generic_file_write (in vmtruncate it isn't
> necessary, truncating a blkdev doesn't make sense anyways). This will
> workaround the ulimit userspace breakage as well.
> 
> --- 2.4.15aa1/mm/filemap.c.~1~	Sat Nov 24 06:55:30 2001
> +++ 2.4.15aa1/mm/filemap.c	Mon Nov 26 17:30:28 2001
> @@ -2908,7 +2908,7 @@
>  	 */
>  	err = -EFBIG;
>  	
> -	if (limit != RLIM_INFINITY) {
> +	if (!S_ISBLK(inode->i_mode) && limit != RLIM_INFINITY) {
>  		if (pos >= limit) {
>  			send_sig(SIGXFSZ, current, 0);
>  			goto out;

The question also should be asked - is "!S_ISBLK" the right test for this?
Should it rather be "S_ISREG" instead?  What about I/O on raw character
devices (e.g. oracle, etc), or tape drives?  I don't _think_ we need to
support > 2GB directories, do we?  If so, do we need compatibility support
for such systems if they ever become available?

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/





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