cls_cgroup: Initialise classid when module is absent
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 26 May 2010 01:53:57 +0000 (18:53 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 May 2010 01:53:57 +0000 (18:53 -0700)
When the cls_cgroup module is not loaded, task_cls_classid will
return an uninitialised classid instead of zero.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/cls_cgroup.h

index 6cf44866cecdb47d8adb1a6d8100ec83fc4c5a02..726cc353640988bd6fed9361f74cb8ef6dfbb9ce 100644 (file)
@@ -39,7 +39,7 @@ extern int net_cls_subsys_id;
 static inline u32 task_cls_classid(struct task_struct *p)
 {
        int id;
-       u32 classid;
+       u32 classid = 0;
 
        if (in_interrupt())
                return 0;