Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Kernel v2.4.19 /kernel/acct.c

Filename:/kernel/acct.c
Lines Added:8
Lines Deleted:1
Also changed in: (Previous) 2.4.19-rc5-ac1  2.4.19-rc5  2.4.19-rc4  2.4.19-rc3-ac5  2.4.19-rc3-ac4  2.4.19-rc3-ac3 
(Following) 2.4.19-ac1  2.4.19-ac2  2.4.19-ac3  2.4.19-ac4  2.4.20-pre1-ac1  2.4.20-pre1-ac2 

Location
[  2.4.19
  [  kernel
     o  acct.c

Patch

diff -urN linux-2.4.18/kernel/acct.c linux-2.4.19/kernel/acct.c
--- linux-2.4.18/kernel/acct.c   Mon Mar 19 12:35:08 2001
+++ linux-2.4.19/kernel/acct.c   Fri Aug  2 17:39:46 2002
@@ -277,6 +277,7 @@
    struct acct ac;
    mm_segment_t fs;
    unsigned long vsize;
+   unsigned long flim;
 
    /*
     * First check to see if there is enough free_space to continue
@@ -338,8 +339,14 @@
          */
    fs = get_fs();
    set_fs(KERNEL_DS);
+   /*
+     * Accounting records are not subject to resource limits.
+     */
+   flim = current->rlim[RLIMIT_FSIZE].rlim_cur;
+   current->rlim[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY;
    file->f_op->write(file, (char *)&ac,
                 sizeof(struct acct), &file->f_pos);
+   current->rlim[RLIMIT_FSIZE].rlim_cur = flim;
    set_fs(fs);
 }
 
@@ -354,7 +361,7 @@
       file = acct_file;
       get_file(file);
       unlock_kernel();
-      do_acct_process(exitcode, acct_file);
+      do_acct_process(exitcode, file);
       fput(file);
    } else
       unlock_kernel();


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.