Package: linux-2.6 Version: 2.6.26-21 Severity: important Tags: patch fixes panic on psql use: http://archives.postgresql.org/pgsql-general/2009-10/msg00125.php will add patch to lenny openvz featureset (checking ABI build atm
-- maks >From 1f7db8ea4a3e4be07047223a0c53fb501346aea7 Mon Sep 17 00:00:00 2001 From: Vitaily Gusev <[email protected]> Date: Mon, 12 Oct 2009 18:53:30 +0400 Subject: [PATCH 87/90] cpt: dump inode content for shm_file_operations If file->f_op == shm_file_operations then cpt code doesn't dump inode content, and dump only for f_op == shmem_file_operations. Bug http://bugzilla.openvz.org/show_bug.cgi?id=1342 Signed-off-by: Vitaliy Gusev <[email protected]> Signed-off-by: Pavel Emelyanov <[email protected]> --- kernel/cpt/cpt_files.c | 22 +++++++++++++--------- 1 files changed, 13 insertions(+), 9 deletions(-) diff --git a/kernel/cpt/cpt_files.c b/kernel/cpt/cpt_files.c index dd05814..866ca53 100644 --- a/kernel/cpt/cpt_files.c +++ b/kernel/cpt/cpt_files.c @@ -620,19 +620,23 @@ static int dump_content_regular(struct file *file, struct cpt_context *ctx) return -EINVAL; do_read = file->f_op->read; - if (file->f_op == &shm_file_operations) { - struct shm_file_data *sfd = file->private_data; - cpt_dump_content_sysvshm(sfd->file, ctx); + if (file->f_op == &shm_file_operations || + file->f_op == &shmem_file_operations) { + struct file *shm_file = file; - return 0; - } - if (file->f_op == &shmem_file_operations) { - do_read = file->f_dentry->d_inode->i_fop->read; - cpt_dump_content_sysvshm(file, ctx); + /* shmget uses shm ops */ + if (file->f_op == &shm_file_operations) { + struct shm_file_data *sfd = file->private_data; + shm_file = sfd->file; + } + + cpt_dump_content_sysvshm(shm_file, ctx); + + do_read = shm_file->f_dentry->d_inode->i_fop->read; if (!do_read) { wprintk_ctx("TMPFS is not configured?\n"); - return dump_content_shm(file, ctx); + return dump_content_shm(shm_file, ctx); } } -- 1.6.5.7 -- System Information: Debian Release: squeeze/sid APT prefers testing APT policy: (900, 'testing'), (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.30-2-amd64 (SMP w/2 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

