if (!(tfm = crypto_alloc_tfm(cksumname, 0))) 
if (!(tfm = crypto_alloc_tfm(cksumname, CRYPTO_TFM_REQ_MAY_SLEEP))) 
make_checksum(s32 cksumtype, char *header, int hdrlen, struct xdr_buf *body,		   struct xdr_netobj *cksum){	char                            *cksumname;	struct crypto_tfm               *tfm = NULL; /* XXX add to ctx? */	struct scatterlist              sg[1];	u32                             code = GSS_S_FAILURE;	int				len, thislen, offset;	int				i;	switch (cksumtype) {		case CKSUMTYPE_RSA_MD5:			cksumname = "md5";			break;		default:			dprintk("RPC:      krb5_make_checksum:"				" unsupported checksum %d", cksumtype);			goto out;	}	if (!(tfm = crypto_alloc_tfm(cksumname, 0)))		goto out;	cksum->len = crypto_tfm_alg_digestsize(tfm);	if ((cksum->data = kmalloc(cksum->len, GFP_KERNEL)) == NULL)		goto out;	crypto_digest_init(tfm);	buf_to_sg(sg, header, hdrlen);	crypto_digest_update(tfm, sg, 1);	if (body->head[0].iov_len) {		buf_to_sg(sg, body->head[0].iov_base, body->head[0].iov_len);		crypto_digest_update(tfm, sg, 1);	}	len = body->page_len;	if (len != 0) {		offset = body->page_base & (PAGE_CACHE_SIZE - 1);		i = body->page_base >> PAGE_CACHE_SHIFT;		thislen = PAGE_CACHE_SIZE - offset;		do {			if (thislen > len)				thislen = len;			sg->page = body->pages[i];			sg->offset = offset;			sg->length = thislen;			crypto_digest_update(tfm, sg, 1);			len -= thislen;			i++;			offset = 0;			thislen = PAGE_CACHE_SIZE;		} while(len != 0);	}	if (body->tail[0].iov_len) {		buf_to_sg(sg, body->tail[0].iov_base, body->tail[0].iov_len);		crypto_digest_update(tfm, sg, 1);	}	crypto_digest_final(tfm, cksum->data);	code = 0;out:	if (tfm)		crypto_free_tfm(tfm);	return code;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/eb6f1160ddb2fdadf50f350da79d0796c37f17e2/gss_krb5_crypto.c/buggy/net/sunrpc/auth_gss/gss_krb5_crypto.c