# Be quite and do not echo the cmd Q = @ # Try to use bash as shell for make SHELL := $(shell if [ -x /bin/bash ]; then echo /bin/bash; else echo /bin/sh; fi ; fi) # GCC related stuff LD = $(Q)echo -e " LD\t$@" && $(CCACHE) $(CROSS_COMPILE)gcc CCNQ = $(CCACHE) $(CROSS_COMPILE)gcc CC = $(Q)echo -e " CC\t$<" && $(CCNQ) ifeq ($(DEBUG), 1) STRIP = $(Q)true else STRIP = $(Q)echo -e " STRIP\t$@" && $(CROSS_COMPILE)strip endif # Flex/bison related LEX = $(Q)echo -e " LEX\t$<" && flex YAAC = $(Q)echo -e " YAAC\t$<" && bison # Installation related INST = echo -e " INST\t$(1)" && install -d $(2) && \ install --mode=644 -DC $(1) $(2)/$(shell basename $(1)) ifeq ("$(origin PREFIX)", "command line") INSTX = echo -e " INST\t$(1)" && install -d $(2) && \ install -C $(1) $(2)/$(shell basename $(1)) else INSTX = echo -e " INST\t$(1)" && install -C $(1) $(2)/$(shell basename $(1)) endif MKDIR = echo -e " MKDIR\t$(1)" && mkdir -p $(1) RM = echo -e " RM\t$(1)" && rm -rf $(1) RMDIR = echo -e " RM\t$(1)" && rmdir --ignore-fail-on-non-empty $(1) 2> /dev/null || true GZIP = gzip --best -c # Git related GIT_ARCHIVE = git archive --prefix=netsniff-ng-$(VERSION_SHORT)/ v$(VERSION_SHORT) | \ $(1) > ../netsniff-ng-$(VERSION_SHORT).tar.$(2) GIT_TAG = git tag -a v$(VERSION_SHORT) -s -m "$(VERSION_SHORT) release" GIT_LOG = git shortlog -n $(shell git tag | tail -n2 | head -n1)..HEAD GIT_REM = git ls-files -o | xargs rm -rf GIT_PEOPLE = git log --no-merges $(shell git tag | tail -n2 | head -n1)..HEAD | grep Author: | cut -d: -f2 | \ cut -d\< -f1 | sort | uniq -c | sort -nr GIT_VERSION = git describe --always # GPG related GPG_SIGN = gpg -a --output ../netsniff-ng-$(VERSION_SHORT).tar.$(1).sign --detach-sig \ ../netsniff-ng-$(VERSION_SHORT).tar.$(1) 8ac743'>treecommitdiff
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2016-10-18 16:30:09 -0400
committerJ. Bruce Fields <bfields@redhat.com>2016-10-26 15:49:48 -0400
commit2876a34466ce382a76b9ffb34757bb48928ac743 (patch)
tree3ef99967d3cf3c5dc577432b73b3e4b03d43df5b
parent0cc11a61b80a1ab1d12f1597b27b8b45ef8bac4a (diff)
sunrpc: don't pass on-stack memory to sg_set_buf
As of ac4e97abce9b "scatterlist: sg_set_buf() argument must be in linear mapping", sg_set_buf hits a BUG when make_checksum_v2->xdr_process_buf, among other callers, passes it memory on the stack. We only need a scatterlist to pass this to the crypto code, and it seems like overkill to require kmalloc'd memory just to encrypt a few bytes, but for now this seems the best fix. Many of these callers are in the NFS write paths, so we allocate with GFP_NOFS. It might be possible to do without allocations here entirely, but that would probably be a bigger project. Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat