public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Feng Liu <Feng.Liu3@windriver.com>, Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 5.10.y] i2c: dev: check return value when calling dev_set_name()
Date: Wed,  2 Apr 2025 17:25:09 -0400	[thread overview]
Message-ID: <20250402123137-ab9b03396cc51ce5@stable.kernel.org> (raw)
In-Reply-To: <20250402061645.1194002-1-Feng.Liu3@windriver.com>

[ Sasha's backport helper bot ]

Hi,

✅ All tests passed successfully. No issues detected.
No action required from the submitter.

The upstream commit SHA1 provided is correct: 993eb48fa199b5f476df8204e652eff63dd19361

WARNING: Author mismatch between patch and upstream commit:
Backport author: Feng Liu<Feng.Liu3@windriver.com>
Commit author: Andy Shevchenko<andriy.shevchenko@linux.intel.com>

Status in newer kernel trees:
6.13.y | Present (exact SHA1)
6.12.y | Present (exact SHA1)
6.6.y | Present (exact SHA1)
6.1.y | Present (exact SHA1)
5.15.y | Present (different SHA1: 2f345bb14ad4)

Note: The patch differs from the upstream commit:
---
1:  993eb48fa199b ! 1:  011fada4599a5 i2c: dev: check return value when calling dev_set_name()
    @@ Metadata
      ## Commit message ##
         i2c: dev: check return value when calling dev_set_name()
     
    +    [ Upstream commit 993eb48fa199b5f476df8204e652eff63dd19361 ]
    +
         If dev_set_name() fails, the dev_name() is null, check the return
         value of dev_set_name() to avoid the null-ptr-deref.
     
         Fixes: 1413ef638aba ("i2c: dev: Fix the race between the release of i2c_dev and cdev")
         Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
         Signed-off-by: Wolfram Sang <wsa@kernel.org>
    +    Signed-off-by: Feng Liu <Feng.Liu3@windriver.com>
    +    Signed-off-by: He Zhe <Zhe.He@windriver.com>
     
      ## drivers/i2c/i2c-dev.c ##
     @@ drivers/i2c/i2c-dev.c: static int i2cdev_attach_adapter(struct device *dev, void *dummy)
    @@ drivers/i2c/i2c-dev.c: static int i2cdev_attach_adapter(struct device *dev, void
     +	if (res)
     +		goto err_put_i2c_dev;
      
    - 	pr_debug("adapter [%s] registered as minor %d\n", adap->name, adap->nr);
    + 	pr_debug("i2c-dev: adapter [%s] registered as minor %d\n",
    + 		 adap->name, adap->nr);
      	return 0;
     +
     +err_put_i2c_dev:
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-5.10.y       |  Success    |  Success   |

      reply	other threads:[~2025-04-02 21:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-02  6:16 [PATCH 5.10.y] i2c: dev: check return value when calling dev_set_name() Feng Liu
2025-04-02 21:25 ` Sasha Levin [this message]

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=20250402123137-ab9b03396cc51ce5@stable.kernel.org \
    --to=sashal@kernel.org \
    --cc=Feng.Liu3@windriver.com \
    --cc=stable@vger.kernel.org \
    /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