All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Caumont <lcaumont2@gmail.com>
To: Sean Young <sean@mess.org>
Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>,
	linux-media@vger.kernel.org
Subject: Re: 'LITE-ON USB2.0 DVB-T Tune' driver crash with kernel 4.13 / ubuntu 17.10
Date: Sat, 11 Nov 2017 20:06:38 +0100	[thread overview]
Message-ID: <CACG2uryHHu-vvHj0B1wGRYZuczB5_8cbD3LBscaBmbN-LFJQMg@mail.gmail.com> (raw)
In-Reply-To: <20171111180159.fb33mc2t467ygfqw@gofer.mess.org>

[-- Attachment #1: Type: text/plain, Size: 597 bytes --]

Hi Sean,

I hope this one will be okay.


2017-11-11 19:01 GMT+01:00 Sean Young <sean@mess.org>:
> Hi Laurent,
>
> On Sat, Nov 11, 2017 at 06:53:54PM +0100, Laurent Caumont wrote:
>> Hi Sean,
>>
>> I just realized that files in media_build/linux/driver are not
>> associate with a git repository. They are retrieved by the build
>> command.
>> So, I cloned the linux-stable repository to generate the patch.
>
> Great, thank you.
>
> We need a Signed-off-by: line to accept your patch, see part 11 of
>
> https://www.kernel.org/doc/html/latest/process/submitting-patches.html
>
> Thanks,
>
> Sean

[-- Attachment #2: 0001-media-dvb-i2c-transfers-over-usb-use-kmalloc-instead.patch --]
[-- Type: text/x-patch, Size: 1255 bytes --]

From bf48cb8988a0335038e8df1a40f1d1b2cf4225d5 Mon Sep 17 00:00:00 2001
From: Laurent Caumont <lcaumont2@gmail.com>
Date: Sat, 11 Nov 2017 18:44:46 +0100
Subject: [PATCH] media: dvb: i2c transfers over usb - use kmalloc instead
 stack Signed-off-by: Laurent Caumont <lcaumont2@gmail.com>

---
 drivers/media/usb/dvb-usb/dibusb-common.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/drivers/media/usb/dvb-usb/dibusb-common.c b/drivers/media/usb/dvb-usb/dibusb-common.c
index 8207e690..e1c31381 100644
--- a/drivers/media/usb/dvb-usb/dibusb-common.c
+++ b/drivers/media/usb/dvb-usb/dibusb-common.c
@@ -223,8 +223,26 @@ EXPORT_SYMBOL(dibusb_i2c_algo);
 
 int dibusb_read_eeprom_byte(struct dvb_usb_device *d, u8 offs, u8 *val)
 {
-	u8 wbuf[1] = { offs };
-	return dibusb_i2c_msg(d, 0x50, wbuf, 1, val, 1);
+	  u8 *wbuf;
+	  u8 *rbuf;
+	  int rc;
+	  
+	  rbuf = kmalloc(1, GFP_KERNEL);
+	  if (!rbuf)
+	    return -ENOMEM;
+	 
+	  wbuf = kmalloc(1, GFP_KERNEL);
+	  if (!wbuf)
+	    return -ENOMEM;
+	  
+         *wbuf = offs;
+
+	 rc = dibusb_i2c_msg(d, 0x50, wbuf, 1, rbuf, 1);
+         kfree(wbuf);
+	 *val = *rbuf;
+	 kfree(rbuf);
+	  
+	return rc;
 }
 EXPORT_SYMBOL(dibusb_read_eeprom_byte);
 
-- 
2.14.1


  reply	other threads:[~2017-11-11 19:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-22 17:49 'LITE-ON USB2.0 DVB-T Tune' driver crash with kernel 4.13 / ubuntu 17.10 Laurent Caumont
2017-10-23  9:43 ` Sean Young
     [not found]   ` <CACG2urzPV2q63-bLP98cHDDqzP3a-oydDScPqG=tVKSCzxREBg@mail.gmail.com>
2017-10-23 18:57     ` Sean Young
2017-10-29 17:54       ` Laurent Caumont
2017-10-29 19:31         ` Sean Young
2017-10-30 20:59           ` Laurent Caumont
2017-11-07 10:15             ` Sean Young
2017-11-07 10:42             ` Mauro Carvalho Chehab
2017-11-10 20:33               ` Laurent Caumont
2017-11-11 10:56                 ` Sean Young
2017-11-11 17:53                   ` Laurent Caumont
2017-11-11 18:01                     ` Sean Young
2017-11-11 19:06                       ` Laurent Caumont [this message]
2017-11-11 20:55                         ` Sean Young
2017-11-12  8:38                           ` Laurent Caumont
2017-11-12 21:06                             ` Sean Young
2017-11-21 21:03                             ` Sean Young
2017-11-21 22:44                               ` Laurent Caumont

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=CACG2uryHHu-vvHj0B1wGRYZuczB5_8cbD3LBscaBmbN-LFJQMg@mail.gmail.com \
    --to=lcaumont2@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@s-opensource.com \
    --cc=sean@mess.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.