/* * AppArmor security module * * This file contains AppArmor security identifier (sid) manipulation fns * * Copyright 2009-2010 Canonical Ltd. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation, version 2 of the * License. * * * AppArmor allocates a unique sid for every profile loaded. If a profile * is replaced it receives the sid of the profile it is replacing. * * The sid value of 0 is invalid. */ #include #include #include #include "include/sid.h" /* global counter from which sids are allocated */ static u32 global_sid; static DEFINE_SPINLOCK(sid_lock); /* TODO FIXME: add sid to profile mapping, and sid recycling */ /** * aa_alloc_sid - allocate a new sid for a profile */ u32 aa_alloc_sid(void) { u32 sid; /* * TODO FIXME: sid recycling - part of profile mapping table */ spin_lock(&sid_lock); sid = (++global_sid); spin_unlock(&sid_lock); return sid; } /** * aa_free_sid - free a sid * @sid: sid to free */ void aa_free_sid(u32 sid) { ; /* NOP ATM */ } p-back'>packet-loop-back net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2016-10-20 15:44:19 +0200
committerTobias Klauser <tklauser@distanz.ch>2017-02-15 10:34:18 +0100
commit5db4992d8f040b8d8db0b86d42806e0c417f7ccf (patch)
tree5b06e952af482d45f3ade64e77824662e34b7fa2 /Documentation/hwmon/w83793
parent370ebb0ef6255132373ed35d13e7b1d8d2eb7003 (diff)
usbnet: pegasus: Use net_device_stats from struct net_devicends-private-remove
Instead of using a private copy of struct net_device_stats in struct pegasus, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Cc: Petko Manolov <petkan@nucleusys.com> Cc: linux-usb@vger.kernel.org Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'Documentation/hwmon/w83793')