tech-kern archive

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

Re: [ARM32] panic when sshd responding



On Mon, Jun 16, 2008 at 12:03 PM, Andy Shevchenko
<andy.shevchenko%gmail.com@localhost> wrote:

Below I've posted the one-line patch to avoid issue. But I suspect
there is a big hack instead of nice solution.

After applying patch the outputs for panic case seems like following
(w/o panic of course):

mycounter: 1
sp: 4608[8192] se: 0x2064c000-0x2064e000 = 2
pmap_kenter_pa: va 0x82e27000, pa 0x83a35000, prot 0x1
pmap_kenter_pa: va 0x82e28000, pa 0x839b2000, prot 0x1
mc: 2 len: 4608 sp: 0 resid: 5503
mycounter: 2
sp: 4608[8192] se: 0x2064e000-0x20650000 = 2
pmap_kenter_pa: va 0x82e30000, pa 0x839c1000, prot 0x1
pmap_kenter_pa: va 0x82e31000, pa 0x83923000, prot 0x1
mc: 3 len: 4608 sp: 0 resid: 895
size: 4608[8192] se: 0x82e27000-0x82e29000 = 2
mycounter: 3
mc: 4 len: 895 sp: 3713 resid: 0
size: 4608[8192] se: 0x82e30000-0x82e32000 = 2

diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 04b5327..4a971c5 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -384,7 +384,7 @@ sosend_loan(struct socket *so, struct uio *uio,
struct mbuf *m, long space)

        uio->uio_resid -= space;
        /* uio_offset not updated, not set/used for write(2) */
-       uio->uio_iov->iov_base = (char *)uio->uio_iov->iov_base + space;
+       uio->uio_iov->iov_base = (char *)uio->uio_iov->iov_base + len;
        uio->uio_iov->iov_len -= space;
        if (uio->uio_iov->iov_len == 0) {
                uio->uio_iov++;


-- 
With Best Regards,
Andy Shevchenko


Home | Main Index | Thread Index | Old Index