* [PATCH] [fs/sysv] Fix NULL deref. when allocating new inode
@ 2010-06-13 19:01 Lubomir Rintel
0 siblings, 0 replies; 4+ messages in thread
From: Lubomir Rintel @ 2010-06-13 19:01 UTC (permalink / raw
To: Christoph Hellwig, linux-kernel; +Cc: Lubomir Rintel
A call to sysv_write_inode() in sysv_new_inode() to its new interface
that replaced wait flag with writeback structure. This was broken by
a9185b41a4f84971b930c519f0c63bd450c4810d.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---
fs/sysv/ialloc.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/fs/sysv/ialloc.c b/fs/sysv/ialloc.c
index 241e976..f2764e2 100644
--- a/fs/sysv/ialloc.c
+++ b/fs/sysv/ialloc.c
@@ -25,6 +25,7 @@
#include <linux/stat.h>
#include <linux/string.h>
#include <linux/buffer_head.h>
+#include <linux/writeback.h>
#include "sysv.h"
/* We don't trust the value of
@@ -139,6 +140,9 @@ struct inode * sysv_new_inode(const struct inode * dir, mode_t mode)
struct inode *inode;
sysv_ino_t ino;
unsigned count;
+ struct writeback_control wbc = {
+ .sync_mode = WB_SYNC_NONE
+ };
inode = new_inode(sb);
if (!inode)
@@ -177,7 +181,7 @@ struct inode * sysv_new_inode(const struct inode * dir, mode_t mode)
mark_inode_dirty(inode);
inode->i_mode = mode; /* for sysv_write_inode() */
- sysv_write_inode(inode, 0); /* ensure inode not allocated again */
+ sysv_write_inode(inode, &wbc); /* ensure inode not allocated again */
mark_inode_dirty(inode); /* cleared by sysv_write_inode() */
/* That's it. */
unlock_super(sb);
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] [fs/sysv] Fix NULL deref. when allocating new inode
@ 2010-06-20 13:17 Lubomir Rintel
2010-06-21 22:40 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Lubomir Rintel @ 2010-06-20 13:17 UTC (permalink / raw
To: Christoph Hellwig; +Cc: linux-kernel, Andrew Morton, Lubomir Rintel
A call to sysv_write_inode() in sysv_new_inode() to its new interface
that replaced wait flag with writeback structure. This was broken by
a9185b41a4f84971b930c519f0c63bd450c4810d.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---
Resending this.
fs/sysv/ialloc.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/fs/sysv/ialloc.c b/fs/sysv/ialloc.c
index 241e976..f2764e2 100644
--- a/fs/sysv/ialloc.c
+++ b/fs/sysv/ialloc.c
@@ -25,6 +25,7 @@
#include <linux/stat.h>
#include <linux/string.h>
#include <linux/buffer_head.h>
+#include <linux/writeback.h>
#include "sysv.h"
/* We don't trust the value of
@@ -139,6 +140,9 @@ struct inode * sysv_new_inode(const struct inode * dir, mode_t mode)
struct inode *inode;
sysv_ino_t ino;
unsigned count;
+ struct writeback_control wbc = {
+ .sync_mode = WB_SYNC_NONE
+ };
inode = new_inode(sb);
if (!inode)
@@ -177,7 +181,7 @@ struct inode * sysv_new_inode(const struct inode * dir, mode_t mode)
mark_inode_dirty(inode);
inode->i_mode = mode; /* for sysv_write_inode() */
- sysv_write_inode(inode, 0); /* ensure inode not allocated again */
+ sysv_write_inode(inode, &wbc); /* ensure inode not allocated again */
mark_inode_dirty(inode); /* cleared by sysv_write_inode() */
/* That's it. */
unlock_super(sb);
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] [fs/sysv] Fix NULL deref. when allocating new inode
2010-06-20 13:17 Lubomir Rintel
@ 2010-06-21 22:40 ` Andrew Morton
2010-06-22 8:26 ` Lubomir Rintel
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2010-06-21 22:40 UTC (permalink / raw
To: Lubomir Rintel; +Cc: Christoph Hellwig, linux-kernel, stable, Al Viro
On Sun, 20 Jun 2010 15:17:23 +0200
Lubomir Rintel <lkundrak@v3.sk> wrote:
> A call to sysv_write_inode() in sysv_new_inode() to its new interface
> that replaced wait flag with writeback structure. This was broken by
> a9185b41a4f84971b930c519f0c63bd450c4810d.
>
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> ---
> Resending this.
> fs/sysv/ialloc.c | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/fs/sysv/ialloc.c b/fs/sysv/ialloc.c
> index 241e976..f2764e2 100644
> --- a/fs/sysv/ialloc.c
> +++ b/fs/sysv/ialloc.c
> @@ -25,6 +25,7 @@
> #include <linux/stat.h>
> #include <linux/string.h>
> #include <linux/buffer_head.h>
> +#include <linux/writeback.h>
> #include "sysv.h"
>
> /* We don't trust the value of
> @@ -139,6 +140,9 @@ struct inode * sysv_new_inode(const struct inode * dir, mode_t mode)
> struct inode *inode;
> sysv_ino_t ino;
> unsigned count;
> + struct writeback_control wbc = {
> + .sync_mode = WB_SYNC_NONE
> + };
>
> inode = new_inode(sb);
> if (!inode)
> @@ -177,7 +181,7 @@ struct inode * sysv_new_inode(const struct inode * dir, mode_t mode)
> mark_inode_dirty(inode);
>
> inode->i_mode = mode; /* for sysv_write_inode() */
> - sysv_write_inode(inode, 0); /* ensure inode not allocated again */
> + sysv_write_inode(inode, &wbc); /* ensure inode not allocated again */
> mark_inode_dirty(inode); /* cleared by sysv_write_inode() */
> /* That's it. */
> unlock_super(sb);
hm. AFACIT this means that 2.6.34's sysvfs will instantaneously oops,
every time.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [fs/sysv] Fix NULL deref. when allocating new inode
2010-06-21 22:40 ` Andrew Morton
@ 2010-06-22 8:26 ` Lubomir Rintel
0 siblings, 0 replies; 4+ messages in thread
From: Lubomir Rintel @ 2010-06-22 8:26 UTC (permalink / raw
To: Andrew Morton; +Cc: Christoph Hellwig, linux-kernel, stable, Al Viro
On Mon, 2010-06-21 at 15:40 -0700, Andrew Morton wrote:
> On Sun, 20 Jun 2010 15:17:23 +0200
> Lubomir Rintel <lkundrak@v3.sk> wrote:
>
> > A call to sysv_write_inode() in sysv_new_inode() to its new interface
> > that replaced wait flag with writeback structure. This was broken by
> > a9185b41a4f84971b930c519f0c63bd450c4810d.
> hm. AFACIT this means that 2.6.34's sysvfs will instantaneously oops,
> every time.
Ah yes, really. I thought I checked that and found that only 2.6.35 was
affected which is why did not cc stable@. git tag --contains proves me
wrong though, sorry for that.
--
Flash is the Web2.0 version of blink and animated gifs.
-- Stephen Smoogen
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-06-22 8:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-13 19:01 [PATCH] [fs/sysv] Fix NULL deref. when allocating new inode Lubomir Rintel
-- strict thread matches above, loose matches on Subject: below --
2010-06-20 13:17 Lubomir Rintel
2010-06-21 22:40 ` Andrew Morton
2010-06-22 8:26 ` Lubomir Rintel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.