kernelleave.openeuler.org
发自我的华为手机
-------- 原始邮件 -------- 发件人: "chengjian (D)" cj.chengjian@huawei.com 日期: 2021年10月26日周二 上午10:20 收件人: xjx00 xjxyklwx@126.com, kernel@openeuler.org 抄送: zhengzengkai@huawei.com, xiexiuqi@huawei.com, "chengjian (D)" cj.chengjian@huawei.com, Wang ShaoBo bobo.shaobowang@huawei.com, Wei Li liwei391@huawei.com 主 题: Re: [PATCH openEuler-21.03] USB: f_ncm: ncm_bitrate (speed) is unsigned Reviewed-by: Cheng Jian 在 2021/10/23 17:03, xjx00 写道: > From: Maciej Żenczykowski > > stable inclusion > from stable-v5.10.44 > commit 0f5a20b1fd9da3ac9f7c6edcad522712ca694d5c > bugzilla:https://bugzilla.openeuler.org/show_bug.cgi?id=358 > CVE: NA > > ------------------------------------------------- > > commit 3370139745853f7826895293e8ac3aec1430508e upstream. > > [ 190.544755] configfs-gadget gadget: notify speed -44967296 > > This is because 4250000000 - 2**32 is -44967296. > > Fixes: 9f6ce4240a2b ("usb: gadget: f_ncm.c added") > Cc: Brooke Basile > Cc: Bryan O'Donoghue > Cc: Felipe Balbi > Cc: Lorenzo Colitti > Cc: Yauheni Kaliuta > Cc: Linux USB Mailing List > Acked-By: Lorenzo Colitti > Signed-off-by: Maciej Żenczykowski > Cc: stable > Link: https://lore.kernel.org/r/20210608005344.3762668-1-zenczykowski@gmail.com > Signed-off-by: Greg Kroah-Hartman > Signed-off-by: xjx00 > --- > drivers/usb/gadget/function/f_ncm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/gadget/function/f_ncm.c b/drivers/usb/gadget/function/f_ncm.c > index 019bea8e09cc..0d23c6c11a13 100644 > --- a/drivers/usb/gadget/function/f_ncm.c > +++ b/drivers/usb/gadget/function/f_ncm.c > @@ -583,7 +583,7 @@ static void ncm_do_notify(struct f_ncm *ncm) > data[0] = cpu_to_le32(ncm_bitrate(cdev->gadget)); > data[1] = data[0]; > > - DBG(cdev, "notify speed %d\n", ncm_bitrate(cdev->gadget)); > + DBG(cdev, "notify speed %u\n", ncm_bitrate(cdev->gadget)); > ncm->notify_state = NCM_NOTIFY_CONNECT; > break; > } _______________________________________________ Kernel mailing list -- kernel@openeuler.org To unsubscribe send an email to kernel-leave@openeuler.org