/* * GPIO tools - utility helpers library for the GPIO tools * * Copyright (C) 2015 Linus Walleij * * Portions copied from iio_utils and lssio: * Copyright (c) 2010 Manuel Stahl * Copyright (c) 2008 Jonathan Cameron * * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published by * the Free Software Foundation. */ #ifndef _GPIO_UTILS_H_ #define _GPIO_UTILS_H_ #include #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) static inline int check_prefix(const char *str, const char *prefix) { return strlen(str) > strlen(prefix) && strncmp(str, prefix, strlen(prefix)) == 0; } int gpiotools_request_linehandle(const char *device_name, unsigned int *lines, unsigned int nlines, unsigned int flag, struct gpiohandle_data *data, const char *consumer_label); int gpiotools_set_values(const int fd, struct gpiohandle_data *data); int gpiotools_get_values(const int fd, struct gpiohandle_data *data); int gpiotools_release_linehandle(const int fd); int gpiotools_get(const char *device_name, unsigned int line); int gpiotools_gets(const char *device_name, unsigned int *lines, unsigned int nlines, struct gpiohandle_data *data); int gpiotools_set(const char *device_name, unsigned int line, unsigned int value); int gpiotools_sets(const char *device_name, unsigned int *lines, unsigned int nlines, struct gpiohandle_data *data); #endif /* _GPIO_UTILS_H_ */ class='tabs'> summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarsh Jain <harsh@chelsio.com>2017-02-01 21:10:28 +0530
committerHerbert Xu <herbert@gondor.apana.org.au>2017-02-03 17:45:48 +0800
commit0b529f143e8baad441a5aac9ad55ec2434d8fb46 (patch)
treefd816e548e12745d4776ad0bd661bec142d3ea06 /net/tipc/sysctl.c
parentc26819900036f5b91608051a0fc7c76f6b4ffc7b (diff)
crypto: algif_aead - Fix kernel panic on list_del
Kernel panics when userspace program try to access AEAD interface. Remove node from Linked List before freeing its memory. Cc: <stable@vger.kernel.org> Signed-off-by: Harsh Jain <harsh@chelsio.com> Reviewed-by: Stephan Müller <smueller@chronox.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'net/tipc/sysctl.c')