Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1302613
| Path | csiph.com!feeder.erje.net!1.eu.feeder.erje.net!fu-berlin.de!bofh.it!news.nic.it!robomod |
|---|---|
| From | Luis Henriques <luis.henriques@canonical.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 3.16.y-ckt 072/126] nfs4: start callback_ident at idr 1 |
| Date | Wed, 06 Jan 2016 12:00:04 +0100 |
| Message-ID | <qNTYU-8si-57@gated-at.bofh.it> (permalink) |
| References | <qNTFw-8jf-7@gated-at.bofh.it> |
| X-Extended-Stable | 3.16 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 38 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Benjamin Coddington <bcodding@redhat.com>, Trond Myklebust <trond.myklebust@primarydata.com>, Luis Henriques <luis.henriques@canonical.com> |
| X-Original-Date | Wed, 6 Jan 2016 10:36:41 +0000 |
| X-Original-Message-ID | <1452076655-12851-73-git-send-email-luis.henriques@canonical.com> |
| X-Original-References | <1452076655-12851-1-git-send-email-luis.henriques@canonical.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1302613 |
Show key headers only | View raw
3.16.7-ckt22 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Coddington <bcodding@redhat.com>
commit c68a027c05709330fe5b2f50c50d5fa02124b5d8 upstream.
If clp->cl_cb_ident is zero, then nfs_cb_idr_remove_locked() skips removing
it when the nfs_client is freed. A decoding or server bug can then find
and try to put that first nfs_client which would lead to a crash.
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Fixes: d6870312659d ("nfs4client: convert to idr_alloc()")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
fs/nfs/nfs4client.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
index af02bf6a418f..1b171b81e7db 100644
--- a/fs/nfs/nfs4client.c
+++ b/fs/nfs/nfs4client.c
@@ -33,7 +33,7 @@ static int nfs_get_cb_ident_idr(struct nfs_client *clp, int minorversion)
return ret;
idr_preload(GFP_KERNEL);
spin_lock(&nn->nfs_client_lock);
- ret = idr_alloc(&nn->cb_ident_idr, clp, 0, 0, GFP_NOWAIT);
+ ret = idr_alloc(&nn->cb_ident_idr, clp, 1, 0, GFP_NOWAIT);
if (ret >= 0)
clp->cl_cb_ident = ret;
spin_unlock(&nn->nfs_client_lock);
--
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/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 3.16.y-ckt 072/126] nfs4: start callback_ident at idr 1 Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:00 +0100
csiph-web