Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193943
b: refs/heads/master
c: f408e0c
h: refs/heads/master
i:
  193941: 97b42ea
  193939: e9c71ae
  193935: f5b23ca
v: v3
  • Loading branch information
James Chapman authored and David S. Miller committed Apr 3, 2010
1 parent db51ba5 commit 9b1be2c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0d76751fad7739014485ba5bd388d4f1b4fd4143
refs/heads/master: f408e0ce40270559ef80f231843c93baa9947bc5
8 changes: 8 additions & 0 deletions trunk/include/linux/genetlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,12 @@ enum {

#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)

#ifdef __KERNEL__

/* All generic netlink requests are serialized by a global lock. */
extern void genl_lock(void);
extern void genl_unlock(void);

#endif /* __KERNEL__ */

#endif /* __LINUX_GENERIC_NETLINK_H */
6 changes: 4 additions & 2 deletions trunk/net/netlink/genetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@

static DEFINE_MUTEX(genl_mutex); /* serialization of message processing */

static inline void genl_lock(void)
void genl_lock(void)
{
mutex_lock(&genl_mutex);
}
EXPORT_SYMBOL(genl_lock);

static inline void genl_unlock(void)
void genl_unlock(void)
{
mutex_unlock(&genl_mutex);
}
EXPORT_SYMBOL(genl_unlock);

#define GENL_FAM_TAB_SIZE 16
#define GENL_FAM_TAB_MASK (GENL_FAM_TAB_SIZE - 1)
Expand Down

0 comments on commit 9b1be2c

Please sign in to comment.