From: Jody McIntyre Date: Tue, 17 May 2005 04:54:05 +0000 (-0700) Subject: [PATCH] ieee1394: fix cross_bound check for null ISO packets X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=74a01d11c92c06a0ceac88ca306d507a8186e7f6;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] ieee1394: fix cross_bound check for null ISO packets Fix cross_bound to not return 1 for zero-length regions. Fixes regression when sending null ISO packets. Signed-off-by: Jody McIntyre Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/ieee1394/ohci1394.h b/drivers/ieee1394/ohci1394.h index d1758d409610..cc66c1cae250 100644 --- a/drivers/ieee1394/ohci1394.h +++ b/drivers/ieee1394/ohci1394.h @@ -236,6 +236,9 @@ struct ti_ohci { static inline int cross_bound(unsigned long addr, unsigned int size) { + if (size == 0) + return 0; + if (size > PAGE_SIZE) return 1;