public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Arjan van de Ven <arjanv@redhat.com>
Cc: Paul Jakma <paul@clubi.ie>,
	Valdis.Kletnieks@vt.edu, Andrew Morton <akpm@osdl.org>,
	Linux Kernel ML <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.6-rc3-mm2 (4KSTACK)
Date: Fri, 7 May 2004 16:13:17 +0100	[thread overview]
Message-ID: <20040507151317.GA15823@redhat.com> (raw)
In-Reply-To: <20040507065105.GA10600@devserv.devel.redhat.com>

On Fri, May 07, 2004 at 08:51:05AM +0200, Arjan van de Ven wrote:
 > 
 > On Fri, May 07, 2004 at 01:37:54AM +0100, Paul Jakma wrote:
 > > On Thu, 6 May 2004, Arjan van de Ven wrote:
 > > 
 > > > Ok I don't want to start a flamewar but... Do we want to hold linux
 > > > back until all binary only module vendors have caught up ??
 > > 
 > > What about normal linux modules though? Eg, NFS (most likely):
 > > 
 > > 	https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=121804
 > 
 > NFSv4 has a > 1Kb stack user; Dave Jones has a fix pending for that...

Hmm, this one maybe?
 
		Dave

--- linux-2.6.5/net/sunrpc/auth_gss/auth_gss.c~	2004-05-05 13:34:31.000000000 +0100
+++ linux-2.6.5/net/sunrpc/auth_gss/auth_gss.c	2004-05-05 13:33:05.000000000 +0100
@@ -429,10 +429,8 @@ gss_pipe_upcall(struct file *filp, struc
 static ssize_t
 gss_pipe_downcall(struct file *filp, const char *src, size_t mlen)
 {
-	char buf[1024];
 	struct xdr_netobj obj = {
 		.len	= mlen,
-		.data	= buf,
 	};
 	struct inode *inode = filp->f_dentry->d_inode;
 	struct rpc_inode *rpci = RPC_I(inode);
@@ -448,11 +446,19 @@ gss_pipe_downcall(struct file *filp, con
 	int err;
 	int gss_err;
 
-	if (mlen > sizeof(buf))
+	obj.data = kmalloc(1024, GFP_KERNEL);
+	if (!obj.data)
+		return -ENOMEM;
+
+	if (mlen > 1024) {
+		kfree (obj.data);
 		return -ENOSPC;
-	left = copy_from_user(buf, src, mlen);
-	if (left)
+	}
+	left = copy_from_user(obj.data, src, mlen);
+	if (left) {
+		kfree (obj.data);
 		return -EFAULT;
+	}
 	clnt = rpci->private;
 	atomic_inc(&clnt->cl_users);
 	auth = clnt->cl_auth;
@@ -477,12 +483,14 @@ gss_pipe_downcall(struct file *filp, con
 	} else
 		spin_unlock(&gss_auth->lock);
 	rpc_release_client(clnt);
+	kfree (obj.data);
 	return mlen;
 err:
 	if (ctx)
 		gss_destroy_ctx(ctx);
 	rpc_release_client(clnt);
 	dprintk("RPC: gss_pipe_downcall returning %d\n", err);
+	kfree (obj.data);
 	return err;
 }
 

  reply	other threads:[~2004-05-07 15:14 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-05  8:31 2.6.6-rc3-mm2 Andrew Morton
2004-05-05  8:46 ` 2.6.6-rc3-mm2 Fabio Coatti
2004-05-05  9:07 ` 2.6.6-rc3-mm2 Onur Kucuk
2004-05-05 11:12 ` 2.6.6-rc3-mm2 (4KSTACK) Dominik Karall
2004-05-05 11:10   ` Ralf Hildebrandt
2004-05-05 11:13   ` Jan-Benedict Glaw
2004-05-05 11:24   ` Arjan van de Ven
2004-05-05 11:30   ` Andrew Morton
2004-05-05 12:09     ` Rene Herman
2004-05-05 16:47     ` Steve Lord
2004-05-05 18:48       ` Felipe Alfaro Solana
2004-05-05 19:51       ` Arjan van de Ven
2004-05-05 19:56         ` Steve Lord
2004-05-05 19:59         ` Arjan van de Ven
2004-05-06 17:44       ` Max Valdez
2004-05-05 20:31     ` Bill Davidsen
2004-05-05 23:04       ` Bartlomiej Zolnierkiewicz
2004-05-06 12:55         ` Norberto Bensa
2004-05-06 13:33           ` Bartlomiej Zolnierkiewicz
2004-05-06 18:47             ` Norberto Bensa
2004-05-09 17:00         ` Bill Davidsen
2004-05-09 18:25           ` Bartlomiej Zolnierkiewicz
2004-05-11 16:24             ` Bill Davidsen
2004-05-11 23:27               ` Bartlomiej Zolnierkiewicz
2004-05-11 23:50                 ` Andrew Morton
2004-05-12  0:05                   ` Valdis.Kletnieks
2004-05-12 16:07                   ` Bill Davidsen
2004-05-12 16:20                     ` Arjan van de Ven
2004-05-15 19:48                       ` Bill Davidsen
2004-05-06 10:09       ` Helge Hafting
2004-05-06 12:54         ` Bill Davidsen
2004-05-05 18:22   ` Valdis.Kletnieks
2004-05-05 21:51     ` Jörn Engel
2004-05-06 15:18       ` Valdis.Kletnieks
2004-05-06 15:40         ` Arjan van de Ven
2004-05-06 16:29           ` Valdis.Kletnieks
2004-05-07  9:50             ` Helge Hafting
2004-05-07  0:37           ` Paul Jakma
2004-05-07  2:50             ` Andrew Morton
2004-05-07  3:44               ` Paul Jakma
2004-05-07  3:58                 ` Andrew Morton
2004-05-07  7:05                   ` Arjan van de Ven
2004-05-07 15:26                   ` Martin J. Bligh
2004-05-07 19:41                     ` Andrew Morton
2004-05-07  6:51             ` Arjan van de Ven
2004-05-07 15:13               ` Dave Jones [this message]
2004-05-07 15:47                 ` Steve Lord
2004-05-07 15:59                   ` Arjan van de Ven
2004-05-07 16:09                     ` J. Bruce Fields
2004-05-07 16:11                     ` Steve Lord
2004-05-07 16:28                       ` Jörn Engel
2004-05-07 19:45               ` Paul Jakma
2004-05-07 19:48                 ` Paul Jakma
2004-05-10 19:49           ` Bill Davidsen
2004-05-10 20:31             ` Horst von Brand
2004-05-11  2:39               ` Andrew Morton
2004-05-11  8:45             ` Helge Hafting
2004-05-11 17:59               ` several messages Bill Davidsen
2004-05-06 16:03         ` 2.6.6-rc3-mm2 (4KSTACK) Malte Schröder
2004-05-06 16:13           ` Valdis.Kletnieks
2004-05-06 17:05         ` Matt Mackall
2004-05-05 13:31 ` 2.6.6-rc3-mm2 [delete-posix-...-unifix-message] Paul Jackson
2004-05-05 15:33 ` 2.6.6-rc3-mm2 Christoph Hellwig
2004-05-05 17:59   ` 2.6.6-rc3-mm2 Arnd Bergmann
2004-05-05 16:06 ` 2.6.6-rc3-mm2 Paul Jackson
2004-05-05 16:40   ` 2.6.6-rc3-mm2 Christoph Hellwig
2004-05-05 16:49     ` 2.6.6-rc3-mm2 Paul Jackson
2004-05-05 20:16   ` 2.6.6-rc3-mm2 R. J. Wysocki
2004-05-06  1:51     ` 2.6.6-rc3-mm2 Paul Jackson
2004-05-06 19:38       ` 2.6.6-rc3-mm2 R. J. Wysocki
2004-05-05 17:10 ` 2.6.6-rc3-mm2 (compile stats) John Cherry
2004-05-05 17:33 ` 2.6.6-rc3-mm2 [sparc, sparc64, mips syscall broken] Paul Jackson
2004-05-05 23:29 ` 2.6.6-rc3-mm2: vermagic compile error if CONFIG_MODULES=n Adrian Bunk
2004-05-06 14:53 ` 2.6.6-rc3-mm2 Antonio Dolcetta
2004-05-06 15:12   ` 2.6.6-rc3-mm2 Andrew Morton
2004-05-06 15:56     ` 2.6.6-rc3-mm2 Antonio Dolcetta
2004-05-06 17:26       ` 2.6.6-rc3-mm2 Adrian Bunk
2004-05-06 21:46 ` 2.6.6-rc3-mm2 Bruce Guenter
2004-05-07  2:52   ` 2.6.6-rc3-mm2 Andrew Morton
2004-05-07  4:16     ` 2.6.6-rc3-mm2 Rusty Russell
2004-05-07 16:05       ` 2.6.6-rc3-mm2 Bruce Guenter
2004-05-07 20:13       ` 2.6.6-rc3-mm2 R. J. Wysocki
2004-05-08  6:09         ` 2.6.6-rc3-mm2 Andrew Morton
     [not found]           ` <200405081329.43017.rjwysocki@sisk.pl>
2004-05-08 11:31             ` 2.6.6-rc3-mm2 Andrew Morton
2004-05-08 16:25               ` 2.6.6-rc3-mm2 R. J. Wysocki
2004-05-08 11:43             ` 2.6.6-rc3-mm2 Andrew Morton
2004-05-08 12:16               ` 2.6.6-rc3-mm2 R. J. Wysocki
2004-05-08 16:59           ` 2.6.6-rc3-mm2 Bruce Guenter
2004-05-08 18:46             ` 2.6.6-rc3-mm2 Andrew Morton
2004-05-08 18:31 ` 2.6.6-rc3-mm2 Joseph Fannin
  -- strict thread matches above, loose matches on Subject: below --
2004-05-06  9:06 2.6.6-rc3-mm2 (4KSTACK) h.verhagen
2004-05-06  9:12 h.verhagen
2004-05-06  9:48 Sid Boyce
     [not found] <1Sq6O-4gJ-25@gated-at.bofh.it>
     [not found] ` <1Sss1-7qC-53@gated-at.bofh.it>
     [not found]   ` <1SzjQ-4EY-21@gated-at.bofh.it>
     [not found]     ` <1SCB0-7kE-11@gated-at.bofh.it>
     [not found]       ` <1SSZ6-3vy-13@gated-at.bofh.it>
     [not found]         ` <1STip-3L3-11@gated-at.bofh.it>
     [not found]           ` <1T1IW-2eH-3@gated-at.bofh.it>
     [not found]             ` <1T7vo-6C2-7@gated-at.bofh.it>
     [not found]               ` <1TfiY-4s1-17@gated-at.bofh.it>
     [not found]                 ` <1TfVX-4T4-51@gated-at.bofh.it>
     [not found]                   ` <1Tg5k-55S-19@gated-at.bofh.it>
     [not found]                     ` <1Tgf4-5cp-27@gated-at.bofh.it>
2004-05-07 18:38                       ` Andi Kleen

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=20040507151317.GA15823@redhat.com \
    --to=davej@redhat.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=akpm@osdl.org \
    --cc=arjanv@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul@clubi.ie \
    /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