[patch 14/22] USB: SN9C10x driver - bad page state fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Damian Wrobel <[email protected]>


This patch solves the following problem I've already discovered on the
latest 2.6.15-rc1-git1 kernel:

Nov 13 07:37:28 wrobel kernel: Bad page state at free_hot_cold_page (in process 'motion', page c164e020)
Nov 13 07:37:28 wrobel kernel: flags:0x40000400 mapping:00000000 mapcount:0 count:0
Nov 13 07:37:28 wrobel kernel: Backtrace:
Nov 13 07:37:28 wrobel kernel:  [<c0146d86>] bad_page+0x85/0xbe
Nov 13 07:37:28 wrobel kernel:  [<c0147629>] free_hot_cold_page+0x54/0x129
Nov 13 07:37:28 wrobel kernel:  [<c01598c6>] __vunmap+0xa9/0xfe
Nov 13 07:37:28 wrobel kernel:  [<c0154114>] vmalloc_to_page+0x34/0x55
Nov 13 07:37:28 wrobel kernel:  [<c0159942>] vfree+0x27/0x35
Nov 13 07:37:28 wrobel kernel:  [<f8a20292>]  sn9c102_release_buffers+0x30/0x3f [sn9c102]
Nov 13 07:37:28 wrobel kernel:  [<f8a231c2>] sn9c102_release+0x37/0xeb [sn9c102]
Nov 13 07:37:28 wrobel kernel:  [<c0163e74>] __fput+0xa9/0x1aa
Nov 13 07:37:28 wrobel kernel:  [<c01624f7>] filp_close+0x49/0x6d
Nov 13 07:37:30 wrobel kernel:  [<c016258f>] sys_close+0x74/0x95
Nov 13 07:37:30 wrobel kernel:  [<c0102ef9>] syscall_call+0x7/0xb
Nov 13 07:37:31 wrobel kernel: Trying to fix it up, but a reboot is needed

Signed-off-by: Damian Wrobel <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/usb/media/sn9c102_core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- usb-2.6.orig/drivers/usb/media/sn9c102_core.c
+++ usb-2.6/drivers/usb/media/sn9c102_core.c
@@ -199,7 +199,7 @@ static void sn9c102_release_buffers(stru
 {
 	if (cam->nbuffers) {
 		rvfree(cam->frame[0].bufmem,
-		       cam->nbuffers * cam->frame[0].buf.length);
+		       cam->nbuffers * PAGE_ALIGN(cam->frame[0].buf.length));
 		cam->nbuffers = 0;
 	}
 }

--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux