mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eddie James <eajames@linux.ibm.com>
To: Paul Fertser <fercerpav@gmail.com>, Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	horms@kernel.org, pabeni@redhat.com, edumazet@google.com,
	davem@davemloft.net, sam@mendozajonas.com,
	Ivan Mikhaylov <fr0st61te@gmail.com>
Subject: Re: [PATCH] net/ncsi: Fix NULL pointer derefence if CIS arrives before SP
Date: Fri, 17 Jan 2025 15:05:24 -0600	[thread overview]
Message-ID: <97ec8df6-0690-4158-be44-ef996746d734@linux.ibm.com> (raw)
In-Reply-To: <Z4g+LmRZC/BXqVbI@home.paul.comp>


On 1/15/25 17:01, Paul Fertser wrote:
> Hi Jakub,
>
> On Tue, Jan 14, 2025 at 02:49:32PM -0800, Jakub Kicinski wrote:
>> Any thoughts on this fix?
> This indeed looks related to what we discussed!
>
>> On Fri, 10 Jan 2025 13:41:33 -0600 Eddie James wrote:
>>> If a Clear Initial State response packet is received before the
>>> Select Package response, then the channel set up will dereference
>>> the NULL package pointer. Fix this by setting up the package
>>> in the CIS handler if it's not found.
> My current notion is that the responses can't normally be re-ordered
> (as we are supposed to send the next command only after receiving
> response for the previous one) and so any surprising event like that
> signifies that the FSM got out of sync (unfortunately it's written in
> such a way that it switches to the "next state" based on the quantity
> of responses the current state expected, not on the actual content of
> them; that's rather fragile).
>
> Sending the "Select Package" command is the first thing that is
> performed after package discovery is complete so problems in that area
> suggest that the reason might be lack of processing for the response
> to the last "Package Deselect" command: receiving it would advance the
> state machine prematurely. It's not quite clear to me how the SP
> response can be lost altogether or what else happens there in the
> failure case, unfortunately it's not reproducible on my system so I
> can't just add more debugging to see all responses and state
> transitions as they happen.
>
> Eddie, how easy is it to reproduce the issue in your setup? Can you
> please try if the change in [0] makes a difference?


I am able to reproduce the panic at will, and unfortunately your patch 
does not prevent the issue.

However I suspect this issue may be unique to my set up, so my patch may 
not be necessary. I found that I had some user space issues. Fixing 
userspace prevented this issue.


Thanks,

Eddie


>
> [0] https://lore.kernel.org/all/Z4ZewoBHkHyNuXT5@home.paul.comp/
>

  reply	other threads:[~2025-01-17 21:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-10 19:41 Eddie James
2025-01-14 22:49 ` Jakub Kicinski
2025-01-15 23:01   ` Paul Fertser
2025-01-17 21:05     ` Eddie James [this message]
2025-01-17 22:43       ` Jakub Kicinski
2025-01-20 14:00       ` Paul Fertser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=97ec8df6-0690-4158-be44-ef996746d734@linux.ibm.com \
    --to=eajames@linux.ibm.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fercerpav@gmail.com \
    --cc=fr0st61te@gmail.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sam@mendozajonas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome