From: Stefan Lippers-Hollmann <s.L-H@gmx.de>
To: linux-kernel@vger.kernel.org
Cc: Chris Wright <chrisw@sous-sol.org>,
stable@kernel.org, Chuck Lever <chuck.lever@oracle.com>,
Trond Myklebust <Trond.Myklebust@netapp.com>
Subject: Re: SUNRPC: Fix a memory leak in rpc_create()
Date: Thu, 17 Apr 2008 23:25:38 +0200 [thread overview]
Message-ID: <200804172325.39462.s.L-H@gmx.de> (raw)
In-Reply-To: <20080417010354.950049854@sous-sol.org>
[-- Attachment #1: Type: text/plain, Size: 5316 bytes --]
Hi
On Donnerstag, 17. April 2008, you wrote:
> -stable review patch. If anyone has any objections, please let us know.
> ---------------------
>
> From: Chuck Lever <chuck.lever@oracle.com>
>
> upstream commit: ed13c27e546667fb0967ae30f5070cd7f6455f90
>
> Commit 510deb0d was supposed to move the xprt_create_transport() call in
> rpc_create(), but neglected to remove the old call site. This resulted in
> a transport leak after every rpc_create() call.
>
> This leak is present in 2.6.24 and 2.6.25.
>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
> ---
>
> net/sunrpc/clnt.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> --- a/net/sunrpc/clnt.c
> +++ b/net/sunrpc/clnt.c
> @@ -249,10 +249,6 @@ struct rpc_clnt *rpc_create(struct rpc_c
> };
> char servername[20];
>
> - xprt = xprt_create_transport(&xprtargs);
> - if (IS_ERR(xprt))
> - return (struct rpc_clnt *)xprt;
> -
> /*
> * If the caller chooses not to specify a hostname, whip
> * up a string representation of the passed-in address.
>
This patch might introduce a regression:
kjournald starting. Commit interval 5 seconds
EXT3 FS on sda1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
NET: Registered protocol family 17
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
Bridge firewalling registered
br0: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature.
device eth0 entered promiscuous mode
audit(1208454819.533:2): dev=eth0 prom=256 old_prom=0 auid=4294967295
br0: port 1(eth0) entering learning state
br0: no IPv6 routers present
eth0: no IPv6 routers present
br0: topology change detected, propagating
br0: port 1(eth0) entering forwarding state
lp0: using parport0 (interrupt-driven).
lp0: console ready
ppdev: user-space parallel port driver
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
BUG: unable to handle kernel NULL pointer dereference at virtual address 000001c2
printing eip: f9043e90 *pde = 00000000
Oops: 0000 [#1] PREEMPT SMP
Modules linked in: nfsd lockd nfs_acl auth_rpcgss sunrpc exportfs ppdev lp ac battery bridge ipv6 af_packet nls_iso8859_1 nls_cp437 vfat fat fuse dm_crypt vboxdrv powernow_k8 freq_table snd_ens1371 gameport snd_hda_intel snd_ac97_codec ac97_bus snd_pcm_oss snd_pcm snd_mixer_oss snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device snd soundcore button i2c_nforce2 snd_page_alloc parport_pc parport k8temp i2c_core psmouse evdev serio_raw pcspkr ext3 jbd dm_mirror dm_snapshot dm_mod sd_mod usb_storage sg sr_mod cdrom usbhid ff_memless sata_nv pata_acpi libusual ata_generic ohci1394 pata_amd forcedeth ieee1394 libata ehci_hcd ohci_hcd usbcore ssb pcmcia pcmcia_core thermal processor fan
Pid: 2874, comm: rpc.nfsd Not tainted (2.6.24-2.6.24.4.slh.6-sidux-686 #1)
EIP: 0060:[<f9043e90>] EFLAGS: 00010282 CPU: 1
EIP is at rpc_create+0x20/0x400 [sunrpc]
EAX: f90575bf EBX: 0000000a ECX: f90575bf EDX: 00000002
ESI: f76d1e20 EDI: f76d1d40 EBP: f76d1d18 ESP: f76d1cb0
DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process rpc.nfsd (pid: 2874, ti=f76d0000 task=df8b3080 task.ti=f76d0000)
Stack: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000202 bae43b63 c0265a43 f76d1d3c f76d1d40 f76d1d44 f76d1d48 f76d1d4c
7d7aeed1 c39f2ca7 00000014 0000000a f76d1e20 f76d1d40 f76d1d18 f9050dda
Call Trace:
[<c0265a43>] __add_entropy_words+0x63/0x1f0
[<f9050dda>] rpcb_create+0xaa/0xb0 [sunrpc]
[<f905113d>] rpcb_register+0xfd/0x1d0 [sunrpc]
[<f904b290>] svc_register+0xa0/0x170 [sunrpc]
[<f904bb89>] __svc_create+0x179/0x1d0 [sunrpc]
[<f90ad3e0>] write_ports+0x0/0x190 [nfsd]
[<f904bc2f>] svc_create_pooled+0x4f/0x170 [sunrpc]
[<f90ac6f0>] nfsd_last_thread+0x0/0x80 [nfsd]
[<f90ac6f0>] nfsd_last_thread+0x0/0x80 [nfsd]
[<f90ad3e0>] write_ports+0x0/0x190 [nfsd]
[<f90ac543>] nfsd_create_serv+0x63/0xd0 [nfsd]
[<f90ac770>] nfsd+0x0/0x2c0 [nfsd]
[<f90ad3e0>] write_ports+0x0/0x190 [nfsd]
[<f90ad472>] write_ports+0x92/0x190 [nfsd]
[<f90ad3e0>] write_ports+0x0/0x190 [nfsd]
[<f90acf65>] nfsctl_transaction_write+0x55/0x80 [nfsd]
[<f90acf10>] nfsctl_transaction_write+0x0/0x80 [nfsd]
[<c01888e5>] vfs_write+0xb5/0x140
[<c0188f81>] sys_write+0x41/0x70
[<c010445a>] syscall_call+0x7/0xb
=======================
Code: 00 00 00 00 8d bc 27 00 00 00 00 83 ec 5c 89 6c 24 58 89 c5 89 5c 24 4c 89 74 24 50 89 7c 24 54 8b 40 14 85 c0 0f 84 37 03 00 00 <0f> b6 83 b8 01 00 00 83 c8 02 88 83 b8 01 00 00 f6 45 24 08 74
EIP: [<f9043e90>] rpc_create+0x20/0x400 [sunrpc] SS:ESP 0068:f76d1cb0
---[ end trace 602ea69c0564d8ad ]---
The kernel has been compiled with gcc 4.2.3 (current debian/ unstable) and
eth0 is part of a bridge using tun/ tap for virtualbox-ose. Neither
2.6.24.4, nor 2.6.24.5-rc1 with this patch reverted trigger this Oops.
Responses might be a little delayed, as I am relaying this report for a
user (and cannot confirm it myself), I'll ask him to test 2.6.25 tomorrow.
Regards
Stefan Lippers-Hollmann
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2008-04-17 21:25 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-17 1:01 [patch 00/66] 2.6.24-stable review Chris Wright
2008-04-17 1:01 ` time: prevent the loop in timespec_add_ns() from being optimised away Chris Wright
2008-04-17 1:01 ` kbuild: soften modpost checks when doing cross builds Chris Wright
2008-04-17 1:01 ` mtd: memory corruption in block2mtd.c Chris Wright
2008-04-17 1:01 ` md: remove the super sysfs attribute from devices in an md array Chris Wright
2008-04-17 1:01 ` V4L: ivtv: Add missing sg_init_table() Chris Wright
2008-04-17 1:01 ` UIO: add pgprot_noncached() to UIO mmap code Chris Wright
2008-04-17 1:01 ` USB: add support for Motorola ROKR Z6 cellphone in mass storage mode Chris Wright
2008-04-17 1:01 ` USB: new quirk flag to avoid Set-Interface Chris Wright
2008-04-17 1:01 ` inotify: fix race Chris Wright
2008-04-17 1:01 ` inotify: remove debug code Chris Wright
2008-04-17 1:01 ` NOHZ: reevaluate idle sleep length after add_timer_on() Chris Wright
2008-04-17 1:01 ` slab: fix cache_cache bootstrap in kmem_cache_init() Chris Wright
2008-04-17 1:01 ` xen: fix RMW when unmasking events Chris Wright
2008-04-17 1:01 ` xen: mask out SEP from CPUID Chris Wright
2008-04-17 1:01 ` xen: fix UP setup of shared_info Chris Wright
2008-04-17 1:01 ` PERCPU : __percpu_alloc_mask() can dynamically size percpu_data storage Chris Wright
2008-04-17 1:01 ` alloc_percpu() fails to allocate percpu data Chris Wright
2008-04-17 1:01 ` vfs: fix data leak in nobh_write_end() Chris Wright
2008-04-17 1:01 ` pci: revert SMBus unhide on HP Compaq nx6110 Chris Wright
2008-04-17 1:01 ` hwmon: (w83781d) Fix I/O resource conflict with PNP Chris Wright
2008-04-17 1:01 ` vmcoreinfo: add the symbol "phys_base" Chris Wright
2008-04-17 9:24 ` Eric W. Biederman
2008-04-17 17:16 ` Chris Wright
2008-04-17 17:29 ` Vivek Goyal
2008-04-18 10:17 ` Ken'ichi Ohmichi
2008-04-17 23:31 ` Eric W. Biederman
2008-04-17 1:01 ` USB: Allow initialization of broken keyspan serial adapters Chris Wright
2008-04-17 1:01 ` USB: serial: fix regression in Visor/Palm OS module for kernels >= 2.6.24 Chris Wright
2008-04-17 1:01 ` USB: serial: ti_usb_3410_5052: Correct TUSB3410 endpoint requirements Chris Wright
2008-04-17 8:01 ` Oliver Neukum
2008-04-17 17:02 ` Greg KH
2008-04-17 1:01 ` CRYPTO xcbc: Fix crash when ipsec uses xcbc-mac with big data chunk Chris Wright
2008-04-17 11:26 ` S.Çağlar Onur
2008-04-17 14:22 ` Herbert Xu
2008-04-17 23:33 ` Chris Wright
2008-04-17 1:01 ` mtd: fix broken state in CFI driver caused by FL_SHUTDOWN Chris Wright
2008-04-17 1:01 ` ipmi: change device node ordering to reflect probe order Chris Wright
2008-04-17 1:01 ` AX25 ax25_out: check skb for NULL in ax25_kick() Chris Wright
2008-04-17 1:01 ` NET: include <linux/types.h> into linux/ethtool.h for __u* typedef Chris Wright
2008-04-17 1:01 ` SUNGEM: Fix NAPI assertion failure Chris Wright
2008-04-17 1:01 ` INET: inet_frag_evictor() must run with BH disabled Chris Wright
2008-04-17 1:01 ` LLC: Restrict LLC sockets to root Chris Wright
2008-04-17 1:01 ` netpoll: zap_completion_queue: adjust skb->users counter Chris Wright
2008-04-17 1:01 ` PPPOL2TP: Make locking calls softirq-safe Chris Wright
2008-04-17 1:01 ` PPPOL2TP: Fix SMP issues in skb reorder queue handling Chris Wright
2008-04-17 1:01 ` NET: Add preemption point in qdisc_run Chris Wright
2008-04-17 1:01 ` sch_htb: fix "too many events" situation Chris Wright
2008-04-17 1:02 ` SCTP: Fix local_addr deletions during list traversals Chris Wright
2008-04-17 1:02 ` NET: Fix multicast device ioctl checks Chris Wright
2008-04-17 1:02 ` TCP: Fix shrinking windows with window scaling Chris Wright
2008-04-17 1:02 ` TCP: Let skbs grow over a page on fast peers Chris Wright
2008-04-17 1:02 ` VLAN: Dont copy ALLMULTI/PROMISC flags from underlying device Chris Wright
2008-04-17 1:02 ` SPARC64: Fix atomic backoff limit Chris Wright
2008-04-17 1:02 ` SPARC64: Fix __get_cpu_var in preemption-enabled area Chris Wright
2008-04-17 1:02 ` SPARC64: flush_ptrace_access() needs preemption disable Chris Wright
2008-04-17 1:02 ` libata: assume no device is attached if both IDENTIFYs are aborted Chris Wright
2008-04-17 1:02 ` sis190: read the mac address from the eeprom first Chris Wright
2008-04-17 1:02 ` bluetooth: hci_core: defer hci_unregister_sysfs() Chris Wright
2008-04-17 1:02 ` SPARC64: Fix FPU saving in 64-bit signal handling Chris Wright
2008-04-17 1:02 ` DVB: tda10086: make the 22kHz tone for DISEQC a config option Chris Wright
2008-04-17 1:02 ` SUNRPC: Fix a memory leak in rpc_create() Chris Wright
2008-04-17 21:25 ` Stefan Lippers-Hollmann [this message]
2008-04-17 22:06 ` Trond Myklebust
2008-04-17 22:09 ` Chris Wright
2008-04-18 14:42 ` Chuck Lever
2008-04-17 1:02 ` HFS+: fix unlink of links Chris Wright
2008-04-17 1:02 ` acpi: fix "buggy BIOS check" when CPUs are hot removed Chris Wright
2008-04-17 1:02 ` plip: replace spin_lock_irq with spin_lock_irqsave in irq context Chris Wright
2008-04-17 1:02 ` signalfd: fix for incorrect SI_QUEUE user data reporting Chris Wright
2008-04-17 1:02 ` md: close a livelock window in handle_parity_checks5 Chris Wright
2008-04-17 1:02 ` POWERPC: Fix build of modular drivers/macintosh/apm_emu.c Chris Wright
2008-04-17 1:02 ` pnpacpi: reduce printk severity for "pnpacpi: exceeded the max number of ..." Chris Wright
2008-04-17 15:24 ` Nick Andrew
2008-04-17 17:09 ` Chris Wright
2008-04-18 21:48 ` Bjorn Helgaas
2008-04-23 4:09 ` [stable PATCH for 2.6.24.5 and 2.6.25] pnpacpi: fix potential corruption on "pnpacpi: exceeded the max number of IRQ resources 2" Len Brown
2008-04-17 1:02 ` PARISC futex: special case cmpxchg NULL in kernel space Chris Wright
2008-04-17 1:02 ` PARISC pdc_console: fix bizarre panic on boot Chris Wright
2008-04-17 1:02 ` PARISC fix signal trampoline cache flushing Chris Wright
2008-04-17 1:02 ` acpi: bus: check once more for an empty list after locking it Chris Wright
2008-04-17 1:02 ` fbdev: fix /proc/fb oops after module removal Chris Wright
2008-04-17 1:02 ` macb: Call phy_disconnect on removing Chris Wright
2008-04-17 1:02 ` file capabilities: remove cap_task_kill() Chris Wright
2008-04-17 1:02 ` locks: fix possible infinite loop in fcntl(F_SETLKW) over nfs Chris Wright
2008-04-18 7:50 ` [stable] [patch 00/66] 2.6.24-stable review Chris Wright
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=200804172325.39462.s.L-H@gmx.de \
--to=s.l-h@gmx.de \
--cc=Trond.Myklebust@netapp.com \
--cc=chrisw@sous-sol.org \
--cc=chuck.lever@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@kernel.org \
/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
all inboxes | Powered by JetHome®