ted your patch and it fixes the issue. Your solution seems indeed much
> cleaner.
>
> FWIW:
>
> Tested-by: Lino Sanfilippo
>
Are you going to send a patch for this? As stated above I verified that your
solution fixes the issue.
Best regards,
Lino
.
Signed-off-by: Lino Sanfilippo
---
drivers/char/tpm/tpm_tis_core.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
index 92c51c6..2c956a1 100644
--- a/drivers/char/tpm/tpm_tis_core.c
+++ b/drivers/char/tpm
visibility between the
interrupt handler and threads.
Finally remove one function which is no longer needed.
Signed-off-by: Lino Sanfilippo
---
drivers/char/tpm/tpm_tis_core.c | 37 ++---
drivers/char/tpm/tpm_tis_core.h | 1 -
include/linux/tpm.h | 2
driver startup
and only release it at driver shutdown.
Signed-off-by: Lino Sanfilippo
---
drivers/char/tpm/tpm-chip.c | 10 --
drivers/char/tpm/tpm_tis_core.c | 16 +---
2 files changed, 9 insertions(+), 17 deletions(-)
diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char
Do not set interrupts which are not supported by the hardware. Instead use
the information from the capability query and activate only the reported
interrupts.
Signed-off-by: Lino Sanfilippo
---
drivers/char/tpm/tpm_tis_core.c | 68 ++---
drivers/char/tpm
Lino Sanfilippo (4):
tpm: Use a threaded interrupt handler
tpm: get locality before writing to TPM chip
tpm: Fix test for interrupts
tpm: Only enable supported irqs
drivers/char/tpm/tpm-chip.c | 10
drivers/char/tpm/tpm_tis_core.c | 127
From: Lino Sanfilippo
The following sequence of operations results in a refcount warning:
1. Open device /dev/tpmrm.
2. Remove module tpm_tis_spi.
3. Write a TPM command to the file descriptor opened at step 1.
[ cut here ]
WARNING: CPU: 3 PID: 1161 at lib/refcount.c:25
etailed
- add fixes tags and kernel logs
Lino Sanfilippo (1):
tpm: fix reference counting for struct tpm_chip
drivers/char/tpm/tpm-chip.c | 48 -
drivers/char/tpm/tpm.h| 1 +
drivers/char/tpm/tpm2-space.c | 55 +
Hi,
On 19.02.21 at 10:13, Jarkko Sakkinen wrote:
>> +rc = cdev_device_add(&chip->cdevs, &chip->devs);
>> +if (rc) {
>> +dev_err(&chip->devs,
>> +"unable to cdev_device_add() %s, major %d, minor %d,
>> err=%d\n",
>> +dev_name(&chip->de
t
Changes in v2:
- drop the patch that erroneously cleaned up after failed installation of
an action handler in tpmm_chip_alloc() (pointed out by Jarkko Sakkinen)
- make the commit message for patch 1 more detailed
- add fixes tags and kernel logs
Lino Sanfilippo (1):
tpm: fix reference counti
From: Lino Sanfilippo
The following sequence of operations results in a refcount warning:
1. Open device /dev/tpmrm.
2. Remove module tpm_tis_spi.
3. Write a TPM command to the file descriptor opened at step 1.
[ cut here ]
WARNING: CPU: 3 PID: 1161 at lib/refcount.c:25
Hi,
On 17.02.21 at 23:18, Jarkko Sakkinen wrote:
>> +
>
> /*
> * Please describe what the heck the function does. No need for full on
> * kdoc.
> */
Ok.
>> +int tpm2_add_device(struct tpm_chip *chip)
>
> Please, rename as tpm_devs_add for coherency sake.
>
Sorry I confused this and rename
From: Lino Sanfilippo
The following sequence of operations results in a refcount warning:
1. Open device /dev/tpmrm.
2. Remove module tpm_tis_spi.
3. Write a TPM command to the file descriptor opened at step 1.
[ cut here ]
WARNING: CPU: 3 PID: 1161 at lib/refcount.c:25
rkko Sakkinen)
- make the commit message for patch 1 more detailed
- add fixes tags and kernel logs
Lino Sanfilippo (1):
tpm: fix reference counting for struct tpm_chip
drivers/char/tpm/tpm-chip.c | 48 +--
drivers/char/tpm/tpm.h| 1 +
drivers/
Please ignore this patch, I somehow managed to cut off the head line.
I will resend it shorty.
Regards,
Lino
From: Lino Sanfilippo
1. Open device /dev/tpmrm.
2. Remove module tpm_tis_spi.
3. Write a TPM command to the file descriptor opened at step 1.
[ cut here ]
WARNING: CPU: 3 PID: 1161 at lib/refcount.c:25 kobject_get+0xa0/0xa4
refcount_t: addition on 0; use-after-free
rkko Sakkinen)
- make the commit message for patch 1 more detailed
- add fixes tags and kernel logs
Lino Sanfilippo (1):
The following sequence of operations results in a refcount warning:
drivers/char/tpm/tpm-chip.c | 48 +--
drivers/char/tpm/tpm.
Hi Stefan,
On 16.02.21 at 17:52, Stefan Berger wrote:
> On 2/15/21 7:31 PM, Lino Sanfilippo wrote:
>> From: Lino Sanfilippo
>>
>> The following sequence of operations results in a refcount warning:
>>
>> 1. Open device /dev/tpmrm
>> 2. Remove module tpm_t
Hi
On 16.02.21 at 17:04, Jarkko Sakkinen wrote:
>>> + /*
>>> +* get extra reference on main device to hold on behalf of devs.
>>> +* This holds the chip structure while cdevs is in use. The
>>> +* corresponding put is in the tpm_devs_release.
>>> +*/
>>> + get_device(&chip->de
ue, Feb 16, 2021 at 01:31:00AM +0100, Lino Sanfilippo wrote:
>>>>>
>>>>> +static int tpm_add_tpm2_char_device(struct tpm_chip *chip)
>>>
>>> BTW, this naming is crap.
>>>
>>> - 2x tpm
>>> - char is useless
>>
Hi,
On 16.02.21 at 13:53, Jason Gunthorpe wrote:
> On Tue, Feb 16, 2021 at 01:31:00AM +0100, Lino Sanfilippo wrote:
>>
>> +static int tpm_add_tpm2_char_device(struct tpm_chip *chip)
>> +{
>> +int rc;
>> +
>> +device_initialize(&chip->devs)
From: Lino Sanfilippo
The following sequence of operations results in a refcount warning:
1. Open device /dev/tpmrm
2. Remove module tpm_tis_spi
3. Write a TPM command to the file descriptor opened at step 1.
[ cut here ]
WARNING: CPU: 3 PID: 1161 at lib/refcount.c:25
detailed
- add fixes tags and kernel logs
Lino Sanfilippo (1):
tpm: fix reference counting for struct tpm_chip
drivers/char/tpm/tpm-chip.c | 80 -
1 file changed, 50 insertions(+), 30 deletions(-)
--
2.7.4
Hi,
On 12.02.21 at 11:59, Jarkko Sakkinen wrote:
>
> One *option*:
>
> 1. You take the Jason's patch.
> 2.
> https://www.kernel.org/doc/html/v5.10/process/submitting-patches.html#when-to-use-acked-by-cc-and-co-developed-by
>
> Just mentioning this, and spreading the knowledge about co-developed-
On 09.02.21 14:36, Jason Gunthorpe wrote:
>>> EXPORT_SYMBOL_GPL(tpm_chip_unregister);
>>>
>>
>> I tested the solution you scetched and it fixes the issue for me. Will you
>> send a (real) patch for this?
>
> No, feel free to bundle this up with any fixes needed and send it with
> a Signed-of
Hi Jason,
On 05.02.21 18:25, Jason Gunthorpe wrote:
> On Fri, Feb 05, 2021 at 08:48:11AM -0800, James Bottomley wrote:
>>> Thanks for pointing this out. I'd strongly support Jason's proposal:
>>>
>>> https://lore.kernel.org/linux-integrity/20201215175624.gg5...@ziepe.ca/
>>>
>>> It's the best long
Hi,
On 05.02.21 14:05, Jason Gunthorpe wrote:
>>
>> Commit fdc915f7f719 ("tpm: expose spaces via a device link /dev/tpmrm")
>> already introduced function tpm_devs_release() to release the extra
>> reference but did not implement the required put on chip->devs that results
>> in the call of this
On 05.02.21 at 16:58, Jason Gunthorpe wrote:
eference in the first place).
>
> No, they are all chained together because they are all in the same
> struct:
>
> struct tpm_chip {
> struct device dev;
> struct device devs;
> struct cdev cdev;
> struct cdev cdevs;
>
> dev holds
On 05.02.21 16:15, Jason Gunthorpe wrote:
>
> No, the cdev layer holds the refcount on the device while open is
> being called.
>
> Jason
>
Yes, but the reference that is responsible for the chip deallocation is
chip->dev
which is linked to chip->cdev and represents /dev/tpm, not /dev/tpmrm.
Hi,
On 05.02.21 03:01, James Bottomley wrote:
> On Thu, 2021-02-04 at 20:44 -0500, Stefan Berger wrote:
>> To clarify: When I tested this I had *both* patches applied. Without
>> the patches I got the null pointer exception in tpm2_del_space(). The
>> 2nd patch alone solves that issue when using t
Hi Stefan,
On 05.02.21 01:46, Stefan Berger wrote:
> On 2/4/21 6:50 PM, Lino Sanfilippo wrote:
>> Signed-off-by: Lino Sanfilippo
>
> Tested-by: Stefan Berger
>
> Steps:
>
> modprobe tpm_vtpm_proxy
>
> swtpm chardev --vtpm-proxy --tpm2 --tpmstate di
slightly better than it had been done previously.
I tested your patch and it fixes the issue. Your solution seems indeed much
cleaner.
FWIW:
Tested-by: Lino Sanfilippo
Best Regards,
Lino
From: Lino Sanfilippo
The following sequence of operations results in a refcount warning:
1. Open device /dev/tpmrm
2. Remove module tpm_tis_spi
3. Write a TPM command to the file descriptor opened at step 1.
[ cut here ]
WARNING: CPU: 3 PID: 1161 at lib/refcount.c:25
From: Lino Sanfilippo
In tpm2_del_space() chip->ops is used for flushing the sessions. However
this function may be called after tpm_chip_unregister() which sets
the chip->ops pointer to NULL.
Avoid a possible NULL pointer dereference by checking if chip->ops is still
valid before acc
cleaned up after failed installation of
an action handler in tpmm_chip_alloc() (pointed out by Jarkko Sakkinen)
- make the commit message for patch 1 more detailed
- add fixes tags and kernel logs
Lino Sanfilippo (2):
tpm: fix reference counting for struct tpm_chip
tpm: in tpm2_del_space check if
Hi,
On 03.02.21 02:17, Jarkko Sakkinen wrote:
> On Tue, Feb 02, 2021 at 11:09:03PM +0100, Lino Sanfilippo wrote:
>> From: Lino Sanfilippo
>>
>> In tpm2_del_space() the sessions are flushed by means of the tpm_chip
>> operations. However the concerning operations po
Hi
On 03.02.21 02:28, Jarkko Sakkinen wrote:
> On Tue, Feb 02, 2021 at 11:09:02PM +0100, Lino Sanfilippo wrote:
>> From: Lino Sanfilippo
>>
>> Provide a function tpm_chip_free() as a counterpart to tpm_chip_alloc().
>> The function hides the internals of freeing a str
Hi,
On 03.02.21 02:09, Jarkko Sakkinen wrote:
> On Tue, Feb 02, 2021 at 11:09:01PM +0100, Lino Sanfilippo wrote:
>> From: Lino Sanfilippo
>>
>> The following sequence of operations
>>
>> 1. open device /dev/tpmrm
>> 2. remove the registered tpm chip driver
From: Lino Sanfilippo
The following sequence of operations
1. open device /dev/tpmrm
2. remove the registered tpm chip driver
3. perform a write() to /dev/tpmrm
results in a refcount warning:
[ cut here ]
WARNING: CPU: 3 PID: 1161 at lib/refcount.c:25 kobject_get+0xa0
From: Lino Sanfilippo
Provide a function tpm_chip_free() as a counterpart to tpm_chip_alloc().
The function hides the internals of freeing a struct tpm_chip instance
by putting the device references which are part of this structure.
Use the new function at the appropriate places.
Signed-off-by
From: Lino Sanfilippo
In tpm2_del_space() the sessions are flushed by means of the tpm_chip
operations. However the concerning operations pointer my already be NULL at
this time in case that the chip has been unregistered (see
tpm_chip_unregister() which calls tpm_del_char_device() which sets
v2:
- drop the patch that erroneously cleaned up after failed installation of
an action handler ni tpmm_chip_alloc() (pointed out by Jarkko Sakkinen)
- make the commit message for patch 1 more detailed
- add fixes tags and kernel logs
Lino Sanfilippo (3):
tpm: fix reference counting for struct
Hi,
On 26.01.21 16:29, Jarkko Sakkinen wrote:
> On Sun, 2021-01-24 at 17:47 +0100, Lino Sanfilippo wrote:
>> Hi Jarkko,
>>
>> On 17.01.21 at 19:13, Jarkko Sakkinen wrote:
>>> I have hard time to believe that any of these patches are based on
>>> actual reg
Hi Jarkko,
On 17.01.21 at 19:13, Jarkko Sakkinen wrote:
>
> I have hard time to believe that any of these patches are based on
> actual regressions.
>
> /Jarko
>
patch 1 is indeed wrong (I oversaw the action call in case of error),
so please ignore it.
However patches 2 and 3 are based on bugs
From: Lino Sanfilippo
In tpm2_del_space() the sessions are flushed by means of the tpm_chip
operations. However the concerning operations pointer my already be NULL at
this time in case that the chip has been unregistered (see
tpm_chip_unregister() which calls tpm_del_char_device() which sets
From: Lino Sanfilippo
In tpmm_chip_alloc() a resource management action handler is installed to
release the chip->dev in case of error. This will result in the chip being
freed if it was the last reference. If the installation of the handler was
not successful an error is returned to the cal
From: Lino Sanfilippo
Commit 8979b02aaf1d ("tpm: Fix reference count to main device") tried to
fix a reference count issue which prevented the tpm_chip structure from
being freed in case that no TPM2 was used. The fix was to only get an extra
reference for chip->dev in case of
From: Lino Sanfilippo
Provide a function tpm_chip_free() as a counterpart to tpm_chip_alloc().
The function hides the internals of freeing a struct tpm_chip instance
by putting the device references which are part of this structure.
Use the new function at the appropriate places.
Signed-off-by
tpm_chip_free() which is used as a counterpart to
tpm_chip_alloc(). The main reason for this function is to hide the
internals of tpm_chip cleanup by means of multiple reference count
handling.
Lino Sanfilippo (4):
tpm: in case of error properly cleanup in tpmm_chip_alloc
tpm: fix reference
Hi Uwe,
> Gesendet: Donnerstag, 10. Dezember 2020 um 12:43 Uhr
> Von: "Uwe Kleine-König"
> An: "Lino Sanfilippo"
> Cc: thierry.red...@gmail.com, lee.jo...@linaro.org, nsaenzjulie...@suse.de,
> f.faine...@gmail.com, r...@broadcom.com, s...@mess.org,
> sbra
possible max value for the 32 bit register.
This has been tested on a Raspberry PI 4.
Signed-off-by: Lino Sanfilippo
---
v4: Remove a superfluous blank line
Remove an unneeded cast (both requested by Uwe Kleine-König)
v3: Check against period truncation (also based on a review by Uwe)
v2: Fix
Hi Uwe
> Hello Lino,
>
> On Tue, Dec 08, 2020 at 11:01:45PM +0100, Lino Sanfilippo wrote:
> > Use the newer .apply function of pwm_ops instead of .config, .enable,
> > .disable and .set_polarity. This guarantees atomic changes of the pwm
> > controller configuration.
possible max value for the 32 bit register.
This has been tested on a Raspberry PI 4.
Signed-off-by: Lino Sanfilippo
---
v3: Check against period truncation (based on a review by Uwe Kleine-König)
v2: Fix compiler error for 64 bit builds
drivers/pwm/pwm-bcm2835.c | 72
Hi,
On 07.12.20 at 14:52, Uwe Kleine-König wrote:
>
> Given that the bcm2835 driver is quite trivial I would be happy to
> create a series that "fixes" the driver to round down and provide a
> prototype for pwm_round_nearest for you to test on pwm-ir-tx. A willing
> tester and a real use-case wer
Hi,
On 04.12.20 at 12:21, Uwe Kleine-König wrote:
>
> I'd make value an unsigned long long and check for > 0x instead
> of repeating the (expensive) division. (Hmm, maybe the compiler is smart
> enough to not actually repeat it, but still.)
I also prefer unsigned long long over u64 sinc
Hi Sean,
On 04.12.20 at 09:44, Sean Young wrote:
>> What about an extra check then to make sure that the period has not been
>> truncated,
>> e.g:
>>
>> value = DIV_ROUND_CLOSEST_ULL(state->period, scaler);
>>
>> /* dont accept a period that is too small or has been truncated */
>>
Hi Uwe,
First off, thanks for the review!
On 29.11.20 at 19:10, Uwe Kleine-König wrote:
>
> Changelog between review rounds go to below the tripple-dash below.
>
Right, will do so in the next patch version.
>
> You're storing an unsigned long long (i.e. 64 bits) in an u32. If
> you are sure
In function iio_map_array_register() properly rewind in case of error.
Signed-off-by: Lino Sanfilippo
Reviewed-by: Andy Shevchenko
---
drivers/iio/inkern.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
index 39c1d63..fe30bcb 100644
--- a
Introduce an unlocked version of iio_map_array_unregister(). This function
can help to unwind in case of error while the iio_map_list_lock mutex is
held.
Signed-off-by: Lino Sanfilippo
Reviewed-by: Andy Shevchenko
---
drivers/iio/inkern.c | 27 ++-
1 file changed, 18
Use the newer apply function of pwm_ops instead of config, enable, disable
and set_polarity.
This guarantees atomic changes of the pwm controller configuration. It also
reduces the size of the driver.
This has been tested on a Raspberry PI 4.
v2: Fixed compiler error
Signed-off-by: Lino
Hi Jonathan,
On 28.11.20 at 14:54, Jonathan Cameron wrote:
> A few notes to make it harder for people to do that in future.
> 1. Don't send patch series (or new versions of older patches) in reply
>to an existing thread. They get lost and difficult to pull out.
>b4 can't automatically f
Use the newer apply function of pwm_ops instead of config, enable, disable
and set_polarity.
This guarantees atomic changes of the pwm controller configuration. It also
reduces the size of the driver.
This has been tested on a Raspberry PI 4.
Signed-off-by: Lino Sanfilippo
---
drivers/pwm/pwm
Introduce an unlocked version of iio_map_array_unregister(). This function
can help to unwind in case of error while the iio_map_list_lock mutex is
held.
Signed-off-by: Lino Sanfilippo
---
drivers/iio/inkern.c | 27 ++-
1 file changed, 18 insertions(+), 9 deletions
In function iio_map_array_register() properly rewind in case of error.
Signed-off-by: Lino Sanfilippo
---
drivers/iio/inkern.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
index 39c1d63..fe30bcb 100644
--- a/drivers/iio/inkern.c
+++ b/drivers
Hi Andy,
Thanks for you suggestion. I agree that it is nicer to reuse the cleanup in
iio_map_array_unregister() than to reimplement it. However I would like to
avoid dropping and regaining the mutex in case of error.
What about the attached approach:
Introduce an unlocked version of iio_map_array
In function map_array_register() properly rewind in case of error.
Furthermore remove the now superfluous initialization of "ret" with 0.
Signed-off-by: Lino Sanfilippo
---
drivers/iio/inkern.c | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/d
Hi,
Am 11.10.20 um 17:07 schrieb Jonathan Cameron:
>
> Good spot. I'd rather we went with a different code flow though.
> See below.
>
Ok, will adjust the code and send a V2 shortly.
Regards,
Lino
In function map_array_register() properly rewind in case of error.
Furthermore save an extra label by using a break instead of goto to leave
the concerning loop.
Signed-off-by: Lino Sanfilippo
---
drivers/iio/inkern.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff
Hi,
> On Wednesday 28 February 2018 05:26 PM, Cornelia Huck wrote:
> > On Wed, 28 Feb 2018 17:14:55 +0530
> > Arvind Yadav wrote:
> >
> >> On Wednesday 28 February 2018 04:00 PM, Cornelia Huck wrote:
> >>> On Wed, 28 Feb 2018 15:24:16 +0530
> >>> Arvind Yadav wrote:
> >>>
> Free memory,
frames = 0;
> unsigned int bytes = 0;
> + unsigned int idx;
>
> /* Limit processing to SLIC_MAX_TX_COMPLETIONS frames to avoid that new
>* completions during processing keeps the loop running endlessly.
>
Acked-by: Lino Sanfilippo
Regards,
Lino
On 30.10.2017 19:04, Jakub Kicinski wrote:
> On Sun, 29 Oct 2017 13:38:09 +, Colin King wrote:
>> From: Colin Ian King
>>
>> Variable idx is being initialized and later on over-written by
>> a new value in a do-loop without the initial value ever being
>> read. Hence the initializion is redund
-355,7 +355,7 @@ static void slic_xmit_complete(struct slic_device *sdev)
> {
> struct slic_tx_queue *txq = &sdev->txq;
> struct net_device *dev = sdev->netdev;
> - unsigned int idx = txq->done_idx;
> + unsigned int idx;
> struct slic_tx_buff
Hi,
> This patch adds the Ethernet over UART driver for the
> Qualcomm QCA7000 HomePlug GreenPHY.
>
> Signed-off-by: Stefan Wahren
> ---
Reviewed-by: Lino Sanfilippo
Regards,
Lino
Hi,
> Gesendet: Mittwoch, 24. Mai 2017 um 11:06 Uhr
> Von: "Stefan Wahren"
> An: "Lino Sanfilippo" , "Rob Herring"
> , "Mark Rutland" , "David S.
> Miller"
> Cc: linux-ser...@vger.kernel.org, "Jiri Slaby" , &qu
On 23.05.2017 21:38, Stefan Wahren wrote:
>
>> Lino Sanfilippo hat am 23. Mai 2017 um 20:16
>> geschrieben:
>>
>>
>> Hi,
>>
>> On 23.05.2017 15:12, Stefan Wahren wrote:
>>
>>
>>> +}
>>> +
>>> +static v
Hi,
On 23.05.2017 15:12, Stefan Wahren wrote:
> +}
> +
> +static void qca_uart_remove(struct serdev_device *serdev)
> +{
> + struct qcauart *qca = serdev_device_get_drvdata(serdev);
> +
> + netif_carrier_off(qca->net_dev);
> + cancel_work_sync(&qca->tx_work);
> + unregister_netde
Hi,
On 10.05.2017 10:53, Stefan Wahren wrote:
> +static int qcauart_netdev_init(struct net_device *dev)
> +{
> + struct qcauart *qca = netdev_priv(dev);
> + size_t len;
> +
> + /* Finish setting up the device info. */
> + dev->mtu = QCAFRM_MAX_MTU;
> + dev->type = ARPHRD_ETHER
gt;
> Detected by CoverityScan, CID#1398313 and CID#1398306 ("Logically
> dead code")
>
> Signed-off-by: Colin Ian King
FWIW:
Reviewed-by: Lino Sanfilippo
Regards,
Lino
Hi,
On 08.05.2017 18:42, SF Markus Elfring wrote:
> From: Markus Elfring
> Date: Mon, 8 May 2017 18:38:17 +0200
>
> A single character (line break) should be put into a sequence.
Why?
> Thus use the corresponding function "seq_putc".
>
> This issue was detected by using the Coccinelle softwar
Hi,
> This patch doesn't look right to me. I would suggest rejecting it.
>
> The call to initialize the stats should be done when the ring is
> allocated, not in ixgbe_probe(). This should probably be done in
> ixgbe_alloc_q_vector() instead.
>
AFAICS ixgbe_alloc_q_vector() is also called in pr
> Gesendet: Donnerstag, 09. Februar 2017 um 12:30 Uhr
> Von: "Salil Mehta"
> An: "Lino Sanfilippo"
> Cc: "da...@davemloft.net" , "Zhuangyuzeng (Yisen)"
> , "mehta.salil@gmail.com"
> , "net...@vger.kernel.org"
Hi,
> From: Kejian Yan
>
> This patch fixes the device being used to DMA map skb->data.
> Erroneous device assignment causes the crash when SMMU is enabled.
> This happens during TX since buffer gets DMA mapped with device
> correspondign to net_device and gets unmapped using the device
> relate
Hi,
On 26.01.2017 23:18, Netanel Belgazal wrote:
When driver fails in probe, it will release all resources,
including adapter.
In case of probe failure, ena_remove should not try to
free the adapter resources.
Signed-off-by: Netanel Belgazal
---
drivers/net/ethernet/amazon/ena/ena_netdev.c |
Hi,
>
>
> This patch should be enhanced with the smb_xx() calls as suggested by by Lino.
>
If you do this, please place the smp_rmb() before the if condition in the irq
handler like
smp_rmb();
if (rtlpci->irq_enabled == 0) {
return ret;
as I think that the suggestion I made before was no
Hi,
On 19.01.2017 19:08, Larry Finger wrote:
On 01/19/2017 08:35 AM, Lino Sanfilippo wrote:
Hi,
altek/rtlwifi/rtl8192ce/hw.c
b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c
index a47be73..143766c4 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c
+++ b/drivers/net
Hi,
altek/rtlwifi/rtl8192ce/hw.c
b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c
> index a47be73..143766c4 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c
> @@ -1306,9 +1306,9 @@ void rtl92ce_enable_interrupt(str
Hi,
On 18.12.2016 19:30, Pavel Machek wrote:
> Hi!
>
>> > - e1efa87241272104d6a12c8b9fcdc4f62634d447
>>
>> Yep, a sync of the dma descriptors before the hardware gets ownership of the
>> tx tail
>> idx is missing in the stmmac, too.
>
> I can reproduce failure with 4.4 fairly easily. I tried w
Hi,
On 18.12.2016 01:15, Francois Romieu wrote:
> Pavel Machek :
> [...]
>> Won't this up/down the interface, in a way userspace can observe?
>
> It won't up/down the interface as it doesn't exactly mimic what the
> network code does (there's more than rtnl_lock).
>
Right. Userspace wont see l
On 15.12.2016 22:32, Lino Sanfilippo wrote:
> Ah ok. Then maybe priv->hw->dma->stop_tx() does not do the job correctly
> (stop the
> tx path properly) and the HW is still active on the tx path while the tx
> buffers are
> freed. OTOH stmmac_release() also stops the p
On 15.12.2016 22:03, Pavel Machek wrote:
>
> I actually did experiment with adding locking there, too, and no, no
> luck. It seems stmmac_tx_err() is more broken than just locking.
>
Ah ok. Then maybe priv->hw->dma->stop_tx() does not do the job correctly (stop
the
tx path properly) and the HW
Hi,
On 15.12.2016 10:45, Pavel Machek wrote:
> Hi!
>
>> The driver uses a private lock for synchronization of the xmit function and
>> the xmit completion handler, but since the NETIF_F_LLTX flag is not set,
>> the xmit function is also called with the xmit_lock held.
>>
>> On the other hand the
Hi,
On 15.12.2016 19:52, Niklas Cassel wrote:
> Since v1 of this patch has already been merged to net-next, I think that
> you should create a new patch on top of that, rather than submitting a v2.
>
> http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/drivers/net/ethernet/stmi
Hi Pavel,
sorry for the late reply.
On 11.12.2016 21:11, Pavel Machek wrote:
>
> Do you understand what stmmac_tx_err(priv); is supposed to do? In
> particular, if it is called while the driver is working ok -- should
> the driver survive that?
As far as I understood it is supposed to fixup an
Hi,
On 09.12.2016 12:21, Pavel Machek wrote:
> On Fri 2016-12-09 00:19:43, Francois Romieu wrote:
>> Lino Sanfilippo :
>> [...]
>> > OTOH Pavel said that he actually could produce a deadlock. Now I wonder if
>> > this is caused by that locking scheme (in a way I
the private lock and (in case that the tx queue had been
stopped) then the xmit_lock.
Improve the locking by removing the private lock and using only the
xmit_lock for synchronization instead.
Signed-off-by: Lino Sanfilippo
---
drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 -
drivers/net
the private lock and (in case that the tx queue had been
stopped) then the xmit_lock.
Improve the locking by removing the private lock and using only the
xmit_lock for synchronization instead.
Signed-off-by: Lino Sanfilippo
---
drivers/net/ethernet/samsung/sxgbe/sxgbe_common.h | 1 -
drivers/net
Hi,
this patch series removes unnecessary private locks in the sxgbe and the
stmmac driver.
v2:
- adjust commit message
On 08.12.2016 23:18, Pavel Machek wrote:
> On Thu 2016-12-08 23:12:10, Lino Sanfilippo wrote:
>> Hi,
>>
>> On 08.12.2016 22:54, Pavel Machek wrote:
>> > On Thu 2016-12-08 21:32:12, Lino Sanfilippo wrote:
>> >> Hi,
>> >>
>> >> O
Hi,
On 08.12.2016 22:54, Pavel Machek wrote:
> On Thu 2016-12-08 21:32:12, Lino Sanfilippo wrote:
>> Hi,
>>
>> On 08.12.2016 00:15, Francois Romieu wrote:
>> > Lino Sanfilippo :
>> >> The driver uses a private lock for synchronization between the x
Hi,
On 08.12.2016 00:15, Francois Romieu wrote:
> Lino Sanfilippo :
>> The driver uses a private lock for synchronization between the xmit
>> function and the xmit completion handler, but since the NETIF_F_LLTX flag
>> is not set, the xmit function is also called wi
1 - 100 of 225 matches
Mail list logo