lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 30 May 2010 07:59:27 +0000
From:	Denis Kirjanov <>
Subject: [PATCH] afs: fix possible null pointer dereference in

Fix possible null pointer dereference since kzalloc can return null

Signed-off-by: Denis Kirjanov <>
fs/afs/server.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/fs/afs/server.c b/fs/afs/server.c
index f490995..32e2a91 100644
--- a/fs/afs/server.c
+++ b/fs/afs/server.c
@@ -93,7 +93,10 @@ static struct afs_server *afs_alloc_server(struct afs_cell *cell,
 		server->addr.s_addr = addr->s_addr;
-	_leave(" = %p{%d}", server, atomic_read(&server->usage));
+	if (likely(server))
+		_leave(" = %p{%d}", server, atomic_read(&server->usage));
+	else
+		_leave(" = -ENOMEM");
 	return server;
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists