Re: 2.5.66-bk12 causes "rpm" errors

From: Andrew Morton (akpm@digeo.com)
Date: Sun Apr 06 2003 - 20:32:34 EST


"Robert P. J. Day" <rpjday@mindspring.com> wrote:
>
>
> got 2.5.66-bk12 to boot on my inspiron 8100, and ran
> "rpm -q iptables", got the following:
>
> rpmdb: write: 0xbfffc2d0, 8192: Invalid argument
> error: db4 error(22) from dbenv->open: Invalid argument
> error: cannot open Packages index using db3 - Invalid argument (22)
> error: cannot open Packages database in /var/lib/rpm
> package iptables is not installed
>

Does it work OK with earlier 2.5 kernels?

The only change which comes to mind is the below one. Could you do a
patch -R of this and retest?

Also, the log from `strace -f -o log rpm -q iptables' would be interesting.

Thanks.

 mm/filemap.c | 10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff -puN mm/filemap.c~file-limit-checking-cleanup mm/filemap.c
--- 25/mm/filemap.c~file-limit-checking-cleanup 2003-04-02 22:51:02.000000000 -0800
+++ 25-akpm/mm/filemap.c 2003-04-02 22:51:02.000000000 -0800
@@ -1509,9 +1509,8 @@ inline int generic_write_checks(struct i
                                 send_sig(SIGXFSZ, current, 0);
                                 return -EFBIG;
                         }
- if (*pos > 0xFFFFFFFFULL || *count > limit-(u32)*pos) {
- /* send_sig(SIGXFSZ, current, 0); */
- *count = limit - (u32)*pos;
+ if (*count > limit - (typeof(limit))*pos) {
+ *count = limit - (typeof(limit))*pos;
                         }
                 }
         }
@@ -1525,9 +1524,8 @@ inline int generic_write_checks(struct i
                         send_sig(SIGXFSZ, current, 0);
                         return -EFBIG;
                 }
- if (*count > MAX_NON_LFS - (u32)*pos) {
- /* send_sig(SIGXFSZ, current, 0); */
- *count = MAX_NON_LFS - (u32)*pos;
+ if (*count > MAX_NON_LFS - (unsigned long)*pos) {
+ *count = MAX_NON_LFS - (unsigned long)*pos;
                 }
         }
 

_

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



This archive was generated by hypermail 2b29 : Mon Apr 07 2003 - 22:00:29 EST