[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110818.220432.1711182086933489213.davem@davemloft.net>
Date: Thu, 18 Aug 2011 22:04:32 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: tim.c.chen@...ux.intel.com
Cc: eric.dumazet@...il.com, viro@...iv.linux.org.uk,
ebiederm@...ssion.com, ak@...ux.intel.com,
matt.fleming@...ux.intel.com, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [Patch] Scm: Remove unnecessary pid & credential references in
Unix socket's send and receive path
From: Tim Chen <tim.c.chen@...ux.intel.com>
Date: Wed, 17 Aug 2011 16:56:14 -0700
> +static __inline__ void scm_release(struct scm_cookie *scm)
> +{
> + /* keep ref on pid and cred */
> + scm->pid = NULL;
> + scm->cred = NULL;
> + if (scm && scm->fp)
> + __scm_destroy(scm);
> +}
After dereferencing scm-> already, it seems a big redundant to test
it subsequently against NULL.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists