BACKPORT: Smack: Three symbols that should be static
authorCasey Schaufler <casey@schaufler-ca.com>
Thu, 30 Jul 2015 21:35:14 +0000 (14:35 -0700)
committerRafal Krypa <r.krypa@samsung.com>
Fri, 12 Aug 2016 15:58:38 +0000 (17:58 +0200)
The kbuild test robot reported a couple of these,
and the third showed up by inspection. Making the
symbols static is proper.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
(cherry-picked from upstream 1eddfe8edb8f85a0d7f793090abcbdf8741455de)

security/smack/smack_lsm.c
security/smack/smackfs.c

index c0659a9b935832990851b49c64df356b10d6a454..a2d957707319c3ceee121aac9e931bbe2d520f72 100644 (file)
@@ -291,7 +291,7 @@ static struct smack_known *smk_fetch(const char *name, struct inode *ip,
  *
  * Returns the new blob or NULL if there's no memory available
  */
-struct inode_smack *new_inode_smack(struct smack_known *skp)
+static struct inode_smack *new_inode_smack(struct smack_known *skp)
 {
        struct inode_smack *isp;
 
@@ -4519,7 +4519,7 @@ static int smack_inode_getsecctx(struct inode *inode, void **ctx, u32 *ctxlen)
        return 0;
 }
 
-struct security_hook_list smack_hooks[] = {
+static struct security_hook_list smack_hooks[] = {
        LSM_HOOK_INIT(ptrace_access_check, smack_ptrace_access_check),
        LSM_HOOK_INIT(ptrace_traceme, smack_ptrace_traceme),
        LSM_HOOK_INIT(syslog, smack_syslog),
index 6976ea8572f0ee69412c92b129ca6a30799dd319..6b3d03df1d9a08ebde9b21540597ef1b5be4473c 100644 (file)
@@ -139,7 +139,7 @@ struct smack_master_list {
        struct smack_rule       *smk_rule;
 };
 
-LIST_HEAD(smack_rule_list);
+static LIST_HEAD(smack_rule_list);
 
 struct smack_parsed_rule {
        struct smack_known      *smk_subject;