login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
October
»
10
Re: [PATCH 15/16] pramfs: test module
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Randy Dunlap
Subject:
Re: [PATCH 15/16] pramfs: test module
Date: Sunday, October 10, 2010 - 9:57 am
On Sun, 10 Oct 2010 18:37:49 +0200 Marco Stornelli wrote:
quoted text
> From: Marco Stornelli <marco.stornelli@gmail.com> > > Test module. > > Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com> > --- > diff -Nurp linux-2.6.36-orig/fs/pramfs/pramfs_test.c linux-2.6.36/fs/pramfs/pramfs_test.c > --- linux-2.6.36-orig/fs/pramfs/pramfs_test.c 1970-01-01 01:00:00.000000000 +0100 > +++ linux-2.6.36/fs/pramfs/pramfs_test.c 2010-09-14 18:49:52.000000000 +0200 > @@ -0,0 +1,49 @@ > +/* > + * FILE NAME fs/pramfs/namei.c > + * > + * BRIEF DESCRIPTION > + * > + * Pramfs test module. > + * > + * Copyright 2009-2010 Marco Stornelli <marco.stornelli@gmail.com> > + * Copyright 2003 Sony Corporation > + * Copyright 2003 Matsushita Electric Industrial Co., Ltd. > + * 2003-2004 (c) MontaVista Software, Inc. , Steve Longerbeam > + * This file is licensed under the terms of the GNU General Public > + * License version 2. This program is licensed "as is" without any > + * warranty of any kind, whether express or implied. > + */ > +#include <linux/module.h> > +#include <linux/version.h> > +#include <linux/init.h> > +#include <linux/fs.h> > +#include "pram.h" > + > +int __init test_pramfs_write(void) > +{ > + struct pram_super_block *psb; > + > + psb = get_pram_super(); > + if (!psb) { > + printk(KERN_ERR > + "%s: PRAMFS super block not found (not mounted?)\n", > + __func__);
Above 2 lines need to indented more.
quoted text
> + return 1; > + } > + > + /* > + * Attempt an unprotected clear of checksum information in the > + * superblock, this should cause a kernel page protection fault. > + */ > + printk("%s: writing to kernel VA %p\n", __func__, psb); > + psb->s_sum = 0; > + > + return 0; > +} > + > +void test_pramfs_write_cleanup(void) {} > + > +/* Module information */ > +MODULE_LICENSE("GPL"); > +module_init(test_pramfs_write); > +module_exit(test_pramfs_write_cleanup);
--- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code *** --
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 15/16] pramfs: test module
, Marco Stornelli
, (Sun Oct 10, 9:37 am)
Re: [PATCH 15/16] pramfs: test module
, Randy Dunlap
, (Sun Oct 10, 9:57 am)
Re: [PATCH 15/16] pramfs: test module
, Marco Stornelli
, (Mon Oct 11, 12:08 am)
Re: [PATCH 15/16] pramfs: test module
, Kieran Bingham
, (Mon Oct 11, 5:24 am)
Re: [PATCH 15/16] pramfs: test module
, Christoph Hellwig
, (Wed Oct 13, 4:23 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Benjamin Herrenschmidt
Re: [PATCH 1/4] hvc_console: do not set low_latency
Russell King
Re: ARM defconfig files
Carsten Otte
Re: [patch] ext2: xip check fix
Jordan Crouse
Re: 2.6.25-mm1
James Morris
Re: [AppArmor 01/41] Pass struct vfsmount to the inode_create LSM hook
git
:
Felipe Contreras
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
Johannes Schindelin
[PATCH] fetch: refuse to fetch into the current branch in a non-bare repository
Johannes Schindelin
Re: [PATCH] Fix install-doc-quick target
Peter Oberndorfer
Subject: [PATCH] fix stg edit command
Nicolas Pitre
Re: About git and the use of SHA-1
linux-netdev
:
Ursula Braun
[patch 2/8] [PATCH] af_iucv: sync sk shutdown flag if iucv path is quiesced
Andi Kleen
Re: RFC: Nagle latency tuning
Gary Thomas
Re: Marvell 88E609x switch?
David Miller
Re: [RFC 0/5] generic rx recycling
Chuck Lever
Re: [RFC] ipv6: Change %pI6 format to output compacted addresses?
dragonflybsd-user
:
Andreas Hauser
Re: Transset.
Tomas
usb printer Brother HL-2030 and DragonFly
Matthew Dillon
Re: DragonFlyBSD not in compliance with RFC 1122
Nikolai Lifanov
pkgsrc issues
Jonas
Re: New to DragonFly...
dragonflybsd-submit
:
Ilya Dryomov
git: HAMMER - Add live_dedup_cache_size sysctl
Matthew Dillon
git: MBUF - Account for failed allocations so netstat -m reports properly.
Simon Schubert
git: make.conf(5): mention STATIC_LOCALES
Matthias Schmidt
cvs commit: src/sys/net bpf.c bpf.h bpfdesc.h
Simon Schubert
git: Revert "Increase the default TCP maximum segment size from 512 to 1460."
Colocation donated by:
Syndicate