Skip to content

Commit

Permalink
NSM: Remove NULL pointer check from nsm_find()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
chucklever authored and J. Bruce Fields committed Jan 6, 2009
1 parent 5cf1c4b commit bc1cc6c
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions fs/lockd/mon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 *pos;

if (!sap)
return NULL;

if (hostname && memchr(hostname, '/', hostname_len) != NULL) {
if (printk_ratelimit()) {
printk(KERN_WARNING "Invalid hostname \"%.*s\" "
Expand Down

0 comments on commit bc1cc6c

Please sign in to comment.