From: Stephen Rothwell <sfr@canb.auug.org.au>
To: will_schmidt@vnet.ibm.com
Cc: linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>
Subject: Re: patches in powerpc.git
Date: Thu, 8 Feb 2007 10:42:34 +1100 [thread overview]
Message-ID: <20070208104234.e85e07cc.sfr@canb.auug.org.au> (raw)
In-Reply-To: <1170866310.6619.55.camel@localhost>
On Wed, 07 Feb 2007 10:38:30 -0600 Will Schmidt <will_schmidt@vnet.ibm.com> wrote:
>
> On Wed, 2007-07-02 at 15:55 +1100, Stephen Rothwell wrote:
> > On Wed, 7 Feb 2007 15:03:13 +1100 Paul Mackerras <paulus@samba.org> wrote:
> > >
> > > If anyone has patches not listed here that they want in 2.6.21, please
> > > let me or the relevant sub-arch maintainer know.
> >
> > How about "Fix ppc64's writing to struct file_operations" sent to you
> > yesterday by Andrew Morton.
> >
>
> Is this the lparcfg fops .write changes that came across LKML
> mid-January? I didnt notice any references to it here..
Yep. Copy below.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
Subject: [patch 03/10] Fix ppc64's writing to struct file_operations
To: paulus@samba.org
Cc: benh@kernel.crashing.org, akpm@linux-foundation.org, sfr@canb.auug.org.au,
arjan@infradead.org
From: akpm@linux-foundation.org
Date: Mon, 05 Feb 2007 16:14:05 -0800
From: Stephen Rothwell <sfr@canb.auug.org.au>
In preparation for marking file_operations as const.
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/powerpc/kernel/lparcfg.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff -puN arch/powerpc/kernel/lparcfg.c~fix-ppc64s-writing-to-struct-file_operations arch/powerpc/kernel/lparcfg.c
--- a/arch/powerpc/kernel/lparcfg.c~fix-ppc64s-writing-to-struct-file_operations
+++ a/arch/powerpc/kernel/lparcfg.c
@@ -439,6 +439,10 @@ static ssize_t lparcfg_write(struct file
ssize_t retval = -ENOMEM;
+ if (!firmware_has_feature(FW_FEATURE_SPLPAR) ||
+ firmware_has_feature(FW_FEATURE_ISERIES))
+ return -EINVAL;
+
kbuf = kmalloc(count, GFP_KERNEL);
if (!kbuf)
goto out;
@@ -517,7 +521,7 @@ static int pseries_lparcfg_data(struct s
static ssize_t lparcfg_write(struct file *file, const char __user * buf,
size_t count, loff_t * off)
{
- return count;
+ return -EINVAL;
}
#endif /* CONFIG_PPC_PSERIES */
@@ -570,6 +574,7 @@ static int lparcfg_open(struct inode *in
struct file_operations lparcfg_fops = {
.owner = THIS_MODULE,
.read = seq_read,
+ .write = lparcfg_write,
.open = lparcfg_open,
.release = single_release,
};
@@ -581,10 +586,8 @@ int __init lparcfg_init(void)
/* Allow writing if we have FW_FEATURE_SPLPAR */
if (firmware_has_feature(FW_FEATURE_SPLPAR) &&
- !firmware_has_feature(FW_FEATURE_ISERIES)) {
- lparcfg_fops.write = lparcfg_write;
+ !firmware_has_feature(FW_FEATURE_ISERIES))
mode |= S_IWUSR;
- }
ent = create_proc_entry("ppc64/lparcfg", mode, NULL);
if (ent) {
_
next prev parent reply other threads:[~2007-02-07 23:42 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-07 4:03 patches in powerpc.git Paul Mackerras
2007-02-07 4:14 ` Grant Likely
2007-02-07 4:25 ` Olof Johansson
2007-02-07 4:55 ` Stephen Rothwell
2007-02-07 16:38 ` Will Schmidt
2007-02-07 23:42 ` Stephen Rothwell [this message]
2007-02-07 6:38 ` Pavel Fedin
2007-02-07 15:22 ` Vitaly Bordug
2007-02-07 22:07 ` Paul Mackerras
2007-02-07 7:39 ` Olof Johansson
2007-02-07 12:18 ` Johannes Berg
2007-02-07 16:11 ` Geert Uytterhoeven
2007-02-08 0:03 ` Paul Mackerras
2007-02-08 14:02 ` Geert Uytterhoeven
2007-02-08 18:42 ` James Simmons
2007-02-07 20:10 ` Guennadi Liakhovetski
2007-02-07 22:24 ` Paul Mackerras
2007-02-07 22:49 ` Guennadi Liakhovetski
2007-02-08 0:01 ` Kumar Gala
2007-02-07 21:10 ` Program Check (700) in lpar.c:551 was: " Will Schmidt
2007-02-07 21:16 ` Benjamin Herrenschmidt
2007-02-07 21:26 ` Benjamin Herrenschmidt
-- strict thread matches above, loose matches on Subject: below --
2007-02-13 20:37 Paul Mackerras
2007-02-13 21:16 ` Arnd Bergmann
2007-02-13 22:15 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070208104234.e85e07cc.sfr@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=will_schmidt@vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).