stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v3] usb: typec: fix bug in typec_register_port call
       [not found] <1552689801-16754-1-git-send-email-anil.kumar.k@intel.com>
@ 2019-03-19  9:03 ` Heikki Krogerus
  2019-03-26  4:46   ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Heikki Krogerus @ 2019-03-19  9:03 UTC (permalink / raw)
  To: anil.kumar.k; +Cc: gregkh, brian.j.wood, stable

On Fri, Mar 15, 2019 at 03:43:21PM -0700, anil.kumar.k@intel.com wrote:
> From: Anil Kumar <anil.kumar.k@intel.com>
> 
> typec_register_port function used variable port->id without
> initializing it. This patch fixes the issue by using the local
> instance for the error case
> 
> Issue is not observed in the mainline tree (5.x)
> 
> Signed-off-by: Anil Kumar <anil.kumar.k@intel.com>
> Fixes: bdecb33af34f ("usb: typec: API for controlling USB Type-C Multiplexers")
> Cc: stable@vger.kernel.org #4.19.x

You have the tag, but I don't see stable@vger.kernel.org on your CC
line? I'm adding it there now. The patch is otherwise OK.

Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
>  drivers/usb/typec/class.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c
> index e61dffb..5a442e4 100644
> --- a/drivers/usb/typec/class.c
> +++ b/drivers/usb/typec/class.c
> @@ -1611,7 +1611,7 @@ struct typec_port *typec_register_port(struct device *parent,
>  	typec_switch_put(port->sw);
>  
>  err_switch:
> -	ida_simple_remove(&typec_index_ida, port->id);
> +	ida_simple_remove(&typec_index_ida, id);
>  	kfree(port);
>  
>  	return ERR_PTR(ret);
> -- 
> 2.7.4

thanks,

-- 
heikki

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] usb: typec: fix bug in typec_register_port call
  2019-03-19  9:03 ` [PATCH v3] usb: typec: fix bug in typec_register_port call Heikki Krogerus
@ 2019-03-26  4:46   ` Greg KH
  2019-03-26  8:26     ` Heikki Krogerus
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2019-03-26  4:46 UTC (permalink / raw)
  To: Heikki Krogerus; +Cc: anil.kumar.k, brian.j.wood, stable

On Tue, Mar 19, 2019 at 11:03:10AM +0200, Heikki Krogerus wrote:
> On Fri, Mar 15, 2019 at 03:43:21PM -0700, anil.kumar.k@intel.com wrote:
> > From: Anil Kumar <anil.kumar.k@intel.com>
> > 
> > typec_register_port function used variable port->id without
> > initializing it. This patch fixes the issue by using the local
> > instance for the error case
> > 
> > Issue is not observed in the mainline tree (5.x)

Why is this not observed there?  What patch fixed this?  Why can we not
backport that fix?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] usb: typec: fix bug in typec_register_port call
  2019-03-26  4:46   ` Greg KH
@ 2019-03-26  8:26     ` Heikki Krogerus
  2019-03-28 11:32       ` Heikki Krogerus
  0 siblings, 1 reply; 4+ messages in thread
From: Heikki Krogerus @ 2019-03-26  8:26 UTC (permalink / raw)
  To: Greg KH; +Cc: anil.kumar.k, brian.j.wood, stable

On Tue, Mar 26, 2019 at 01:46:40PM +0900, Greg KH wrote:
> On Tue, Mar 19, 2019 at 11:03:10AM +0200, Heikki Krogerus wrote:
> > On Fri, Mar 15, 2019 at 03:43:21PM -0700, anil.kumar.k@intel.com wrote:
> > > From: Anil Kumar <anil.kumar.k@intel.com>
> > > 
> > > typec_register_port function used variable port->id without
> > > initializing it. This patch fixes the issue by using the local
> > > instance for the error case
> > > 
> > > Issue is not observed in the mainline tree (5.x)
> 
> Why is this not observed there?  What patch fixed this?  Why can we not
> backport that fix?

Commit 23481121c81d (accidentally) fixes the problem, but you can't
backport that alone. You would need at least the following five
patches with it (23481121c81d is the second last):

148b0aa78e4e ("platform: x86: intel_cht_int33fe: Remove the old connections for the muxes")
23481121c81d ("usb: typec: class: Don't use port parent for getting mux handles")
495965a1002a ("platform: x86: intel_cht_int33fe: Add connections for the USB Type-C port")
78d2b54b134e ("platform: x86: intel_cht_int33fe: Add connection for the DP alt mode")
140a4ec4addd ("platform: x86: intel_cht_int33fe: Register all connections at once")
cd7753d37138 ("drivers: base: Helpers for adding device connection descriptions")


thanks,

-- 
heikki

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] usb: typec: fix bug in typec_register_port call
  2019-03-26  8:26     ` Heikki Krogerus
@ 2019-03-28 11:32       ` Heikki Krogerus
  0 siblings, 0 replies; 4+ messages in thread
From: Heikki Krogerus @ 2019-03-28 11:32 UTC (permalink / raw)
  To: Greg KH; +Cc: anil.kumar.k, brian.j.wood, stable

On Tue, Mar 26, 2019 at 10:26:21AM +0200, Heikki Krogerus wrote:
> On Tue, Mar 26, 2019 at 01:46:40PM +0900, Greg KH wrote:
> > On Tue, Mar 19, 2019 at 11:03:10AM +0200, Heikki Krogerus wrote:
> > > On Fri, Mar 15, 2019 at 03:43:21PM -0700, anil.kumar.k@intel.com wrote:
> > > > From: Anil Kumar <anil.kumar.k@intel.com>
> > > > 
> > > > typec_register_port function used variable port->id without
> > > > initializing it. This patch fixes the issue by using the local
> > > > instance for the error case
> > > > 
> > > > Issue is not observed in the mainline tree (5.x)
> > 
> > Why is this not observed there?  What patch fixed this?  Why can we not
> > backport that fix?
> 
> Commit 23481121c81d (accidentally) fixes the problem, but you can't
> backport that alone. You would need at least the following five
> patches with it (23481121c81d is the second last):
> 
> 148b0aa78e4e ("platform: x86: intel_cht_int33fe: Remove the old connections for the muxes")
> 23481121c81d ("usb: typec: class: Don't use port parent for getting mux handles")
> 495965a1002a ("platform: x86: intel_cht_int33fe: Add connections for the USB Type-C port")
> 78d2b54b134e ("platform: x86: intel_cht_int33fe: Add connection for the DP alt mode")
> 140a4ec4addd ("platform: x86: intel_cht_int33fe: Register all connections at once")
> cd7753d37138 ("drivers: base: Helpers for adding device connection descriptions")

I've now tested these on top of v4.19.x, and I'm confident that these
are all the prerequisites that are needed. I'll send the original
patch to stable@vger.kernel.org ml.


thanks,

-- 
heikki

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-28 11:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1552689801-16754-1-git-send-email-anil.kumar.k@intel.com>
2019-03-19  9:03 ` [PATCH v3] usb: typec: fix bug in typec_register_port call Heikki Krogerus
2019-03-26  4:46   ` Greg KH
2019-03-26  8:26     ` Heikki Krogerus
2019-03-28 11:32       ` Heikki Krogerus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).