From: David Laight <David.Laight@ACULAB.COM>
To: 'Enzo Matsumiya' <ematsumiya@suse.de>,
Muhammad Usama Anjum <usama.anjum@collabora.com>
Cc: Steve French <sfrench@samba.org>, Paulo Alcantara <pc@cjr.nz>,
"Ronnie Sahlberg" <lsahlber@redhat.com>,
Shyam Prasad N <sprasad@microsoft.com>,
"Tom Talpey" <tom@talpey.com>,
"kernel@collabora.com" <kernel@collabora.com>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
"linux-cifs@vger.kernel.org" <linux-cifs@vger.kernel.org>,
"samba-technical@lists.samba.org"
<samba-technical@lists.samba.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 1/2] cifs: remove initialization value
Date: Wed, 5 Oct 2022 14:13:13 +0000 [thread overview]
Message-ID: <fbb39e4354434cb99b6f6731cab2e0c9@AcuMS.aculab.com> (raw)
In-Reply-To: <20221004142306.ysgh45nhgdo4z3ok@suse.de>
From: Enzo Matsumiya
> Sent: 04 October 2022 15:23
>
> Hi Usama,
>
> On 10/04, Muhammad Usama Anjum wrote:
> >Don't initialize the rc as its value is being overwritten before its
> >use.
>
> Being bitten by an unitialized variable bug as recent as 2 days ago, I'd
> say this is a step backwards from the "best practices" POV.
Depends on your POV.
If you don't initialise locals there is a fair chance that the
compiler will detect buggy code.
If you initialise them you get well defined behaviour - but
the compiler won't find bugs for you.
Mostly the kernel is in the first camp.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2022-10-05 14:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-04 6:23 [PATCH 1/2] cifs: remove initialization value Muhammad Usama Anjum
2022-10-04 6:23 ` [PATCH 2/2] cifs: check returned value for error Muhammad Usama Anjum
2022-10-04 19:01 ` Paulo Alcantara
2022-10-05 5:17 ` Muhammad Usama Anjum
2022-10-04 14:23 ` [PATCH 1/2] cifs: remove initialization value Enzo Matsumiya
2022-10-05 14:13 ` David Laight [this message]
2022-10-07 19:22 ` 'Enzo Matsumiya'
2022-10-05 14:58 ` Dan Carpenter
2022-10-04 18:59 ` Paulo Alcantara
2022-10-05 7:05 ` Steve French
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=fbb39e4354434cb99b6f6731cab2e0c9@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=ematsumiya@suse.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=kernel@collabora.com \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lsahlber@redhat.com \
--cc=pc@cjr.nz \
--cc=samba-technical@lists.samba.org \
--cc=sfrench@samba.org \
--cc=sprasad@microsoft.com \
--cc=tom@talpey.com \
--cc=usama.anjum@collabora.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