mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 23:20:05 +00:00
NSM: Remove NULL pointer check from nsm_find()
The nsm_find() function should never be called with a NULL IP address pointer. If it is, that's a bug. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
This commit is contained in:
parent
5cf1c4b19d
commit
bc1cc6c4e4
@ -224,9 +224,6 @@ struct nsm_handle *nsm_find(const struct sockaddr *sap, const size_t salen,
|
|||||||
struct nsm_handle *nsm = NULL;
|
struct nsm_handle *nsm = NULL;
|
||||||
struct nsm_handle *pos;
|
struct nsm_handle *pos;
|
||||||
|
|
||||||
if (!sap)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
if (hostname && memchr(hostname, '/', hostname_len) != NULL) {
|
if (hostname && memchr(hostname, '/', hostname_len) != NULL) {
|
||||||
if (printk_ratelimit()) {
|
if (printk_ratelimit()) {
|
||||||
printk(KERN_WARNING "Invalid hostname \"%.*s\" "
|
printk(KERN_WARNING "Invalid hostname \"%.*s\" "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user