Re: [bug report] mctp: Add route input to socket tests

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

 



Hi Dan,
Thanks for the report.

> Commit 8892c0490779 ("mctp: Add route input to socket tests") from
> Oct 3, 2021 (linux-next), leads to the following Smatch static
> checker warning:
> 
>         net/mctp/test/route-test.c:369 mctp_test_route_input_sk()
>         warn: 'skb' was already freed. (line 365)

[...]

>     363 
>     364         if (params->deliver) {
>     365                 KUNIT_EXPECT_EQ(test, rc, 0);
>     366 
>     367                 skb2 = skb_recv_datagram(sock->sk, MSG_DONTWAIT, &rc);
>     368                 KUNIT_EXPECT_NOT_ERR_OR_NULL(test, skb2);
> --> 369                 KUNIT_EXPECT_EQ(test, skb->len, 1);
>                                               ^^^^^^^^
> I wonder if this was intended to be skb2->len?

Yep, exactly. Good catch.

I'll get a patch sent soon.

Cheers,


Jeremy




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux