Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1516259 > unrolled thread
| Started by | Shuah Khan <shuahkh@osg.samsung.com> |
|---|---|
| First post | 2016-11-07 16:50 +0100 |
| Last post | 2016-11-07 17:20 +0100 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH] net/netfiliter: Fix used uninitialized warn in ip_vs_proc_sync_conn() Shuah Khan <shuahkh@osg.samsung.com> - 2016-11-07 16:50 +0100
Re: [PATCH] net/netfiliter: Fix used uninitialized warn in ip_vs_proc_sync_conn() Shuah Khan <shuahkh@osg.samsung.com> - 2016-11-07 17:20 +0100
| From | Shuah Khan <shuahkh@osg.samsung.com> |
|---|---|
| Date | 2016-11-07 16:50 +0100 |
| Subject | [PATCH] net/netfiliter: Fix used uninitialized warn in ip_vs_proc_sync_conn() |
| Message-ID | <sAUlk-4ZD-5@gated-at.bofh.it> |
Fix the following warn:
net/netfilter/ipvs/ip_vs_sync.c: In function ‘ip_vs_proc_sync_conn’:
net/netfilter/ipvs/ip_vs_sync.c:1069:33: warning: ‘opt.init_seq’ may be used uninitialized in this function [-Wmaybe-uninitialized]
struct ip_vs_sync_conn_options opt;
^~~
net/netfilter/ipvs/ip_vs_sync.c:1069:33: warning: ‘opt.delta’ may be used uninitialized in this function [-Wmaybe-uninitialized]
net/netfilter/ipvs/ip_vs_sync.c:1069:33: warning: ‘opt.previous_delta’ may be used uninitialized in this function [-Wmaybe-uninitialized]
net/netfilter/ipvs/ip_vs_sync.c:1069:33: warning: ‘*((void *)&opt+12).init_seq’ may be used uninitialized in this function [-Wmaybe-uninitialized]
net/netfilter/ipvs/ip_vs_sync.c:1069:33: warning: ‘*((void *)&opt+12).delta’ may be used uninitialized in this function [-Wmaybe-uninitialized]
net/netfilter/ipvs/ip_vs_sync.c:1069:33: warning: ‘*((void *)&opt+12).previous_delta’ may be used uninitialized in this function [-Wmaybe-uninitialized]
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
fs/nfs/nfs4session.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfs/nfs4session.c b/fs/nfs/nfs4session.c
index b629730..68e700e 100644
--- a/fs/nfs/nfs4session.c
+++ b/fs/nfs/nfs4session.c
@@ -196,7 +196,7 @@ static int nfs4_slot_get_seqid(struct nfs4_slot_table *tbl, u32 slotid,
static bool nfs4_slot_seqid_in_use(struct nfs4_slot_table *tbl,
u32 slotid, u32 seq_nr)
{
- u32 cur_seq;
+ u32 cur_seq = 0;
bool ret = false;
spin_lock(&tbl->slot_tbl_lock);
--
2.9.3
[toc] | [next] | [standalone]
| From | Shuah Khan <shuahkh@osg.samsung.com> |
|---|---|
| Date | 2016-11-07 17:20 +0100 |
| Subject | Re: [PATCH] net/netfiliter: Fix used uninitialized warn in ip_vs_proc_sync_conn() |
| Message-ID | <sAUOl-5sm-27@gated-at.bofh.it> |
| In reply to | #1516259 |
On 11/07/2016 08:44 AM, Anna Schumaker wrote:
> Hi Shuah,
>
> On 11/07/2016 10:41 AM, Shuah Khan wrote:
>> Fix the following warn:
>>
>> net/netfilter/ipvs/ip_vs_sync.c: In function ‘ip_vs_proc_sync_conn’:
>> net/netfilter/ipvs/ip_vs_sync.c:1069:33: warning: ‘opt.init_seq’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>> struct ip_vs_sync_conn_options opt;
>> ^~~
>> net/netfilter/ipvs/ip_vs_sync.c:1069:33: warning: ‘opt.delta’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>> net/netfilter/ipvs/ip_vs_sync.c:1069:33: warning: ‘opt.previous_delta’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>> net/netfilter/ipvs/ip_vs_sync.c:1069:33: warning: ‘*((void *)&opt+12).init_seq’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>> net/netfilter/ipvs/ip_vs_sync.c:1069:33: warning: ‘*((void *)&opt+12).delta’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>> net/netfilter/ipvs/ip_vs_sync.c:1069:33: warning: ‘*((void *)&opt+12).previous_delta’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>
> Are you sure you put the right commit message on this patch? The message describes a warning in ip_vs_sync.c, but the patch is for nfs4session.c.
>
> Thanks,
> Anna
Oops. Sorry about this. Bad cut and paste from make output.
I will resend the patch with the correct changelog
thanks,
-- Shuah
>
>>
>> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
>> ---
>> fs/nfs/nfs4session.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/fs/nfs/nfs4session.c b/fs/nfs/nfs4session.c
>> index b629730..68e700e 100644
>> --- a/fs/nfs/nfs4session.c
>> +++ b/fs/nfs/nfs4session.c
>> @@ -196,7 +196,7 @@ static int nfs4_slot_get_seqid(struct nfs4_slot_table *tbl, u32 slotid,
>> static bool nfs4_slot_seqid_in_use(struct nfs4_slot_table *tbl,
>> u32 slotid, u32 seq_nr)
>> {
>> - u32 cur_seq;
>> + u32 cur_seq = 0;
>> bool ret = false;
>>
>> spin_lock(&tbl->slot_tbl_lock);
>>
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web