From: Adrian Bunk <bunk@stusta.de>
To: Jean Delvare <khali@linux-fr.org>
Cc: Urban Widmark <urban@teststation.com>,
samba@samba.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@osdl.org>
Subject: [2.6 patch] fs/smbfs/request.c: turn NULL dereference into BUG()
Date: Sat, 26 Mar 2005 14:11:32 +0100 [thread overview]
Message-ID: <20050326131132.GB3237@stusta.de> (raw)
In-Reply-To: <20050326125301.GA3237@stusta.de>
On Sat, Mar 26, 2005 at 01:53:01PM +0100, Adrian Bunk wrote:
>...
> The problem is actually only in the SMB_RECV_END and SMB_RECV_REQUEST
> cases and all code after the NULL pointer dereference is actually dead
> code.
>...
OK, this was also wrong...
Third try.
cu
Adrian
<-- snip -->
In a case documented as
We should never be called with any of these states
BUG() in a case that would later result in a NULL pointer dereference.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.12-rc1-mm3-full/fs/smbfs/request.c.old 2005-03-26 13:19:19.000000000 +0100
+++ linux-2.6.12-rc1-mm3-full/fs/smbfs/request.c 2005-03-26 13:41:30.000000000 +0100
@@ -786,8 +642,7 @@ int smb_request_recv(struct smb_sb_info
/* We should never be called with any of these states */
case SMB_RECV_END:
case SMB_RECV_REQUEST:
- server->rstate = SMB_RECV_END;
- break;
+ BUG();
}
if (result < 0) {
next prev parent reply other threads:[~2005-03-26 13:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-25 0:15 [2.6 patch] fs/smbfs/request.c: fix NULL dereference Adrian Bunk
2005-03-26 9:02 ` Jean Delvare
2005-03-26 12:53 ` [2.6 patch] fs/smbfs/request.c: turn NULL dereference into BUG() Adrian Bunk
2005-03-26 13:11 ` Adrian Bunk [this message]
2005-03-26 18:16 ` Jean Delvare
2005-04-09 8:47 ` Jean Delvare
2005-07-15 21:34 Adrian Bunk
2005-10-31 11:13 Adrian Bunk
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=20050326131132.GB3237@stusta.de \
--to=bunk@stusta.de \
--cc=akpm@osdl.org \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=samba@samba.org \
--cc=urban@teststation.com \
/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®