From: Frank Haverkamp <haver@linux.vnet.ibm.com> To: Dan Carpenter <dan.carpenter@oracle.com> Cc: fengguang.wu@intel.com, jim.epost@gmail.com, sfr@canb.auug.org.au, gregkh@linuxfoundation.org, linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, kbuild-all@01.org Subject: Re: [PATCH 1/2] GenWQE: Fix endian issues detected by sparse Date: Tue, 07 Jan 2014 13:30:16 +0100 [thread overview] Message-ID: <1389097816.15325.7.camel@oc7383187364.ibm.com> (raw) In-Reply-To: <20140107064130.GA5494@mwanda> Hi Dan, Am Dienstag, den 07.01.2014, 09:41 +0300 schrieb Dan Carpenter: > Could you also fix this Smatch warning? > drivers/misc/genwqe/card_dev.c:658 do_flash_update() warn: maybe return -EFAULT instead of the bytes remaining? I thought i fixed this already in my posting: [PATCH] GenWQE: Rework return code for flash-update ioctl from 22.12.2013 14:16:36: Here the spot: @@ -565,14 +552,13 @@ static int do_flash_update(struct genwqe rc = copy_from_user(xbuf, buf, tocopy); if (rc) { - dev_err(&pci_dev->dev, - "err: could not copy all data rc=%d\n", rc); + rc = -EFAULT; goto free_buffer; } crc = genwqe_crc32(xbuf, tocopy, 0xffffffff); - dev_info(&pci_dev->dev, - "[%s] DMA: 0x%llx CRC: %08x SZ: %ld %d\n", + dev_dbg(&pci_dev->dev, + "[%s] DMA: 0x%llx CRC: %08x SZ: %ld %d\n", __func__, dma_addr, crc, tocopy, blocks_to_flash); > > Also we shouldn't be doing dev_err() on copy_to/from_user() problems. > The user can trigger those and flood dmesg. It is a DoS (annoying). > > regards, > dan carpenter > In this patch I also removed most of the dev_err() messages. Fixing the possibility to overflow the logs with error messages from user-side. Greg did not pick up this patch yet, as far as I can see. Regards Frank
next prev parent reply other threads:[~2014-01-07 12:30 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-12-20 14:17 randconfig build error with next-20131220, in drivers/misc/genwqe/genwqe_driver.h Jim Davis 2013-12-20 15:26 ` [PATCH 1/2] GenWQE: Fix endian issues detected by sparse Frank Haverkamp 2013-12-20 16:47 ` Greg KH 2013-12-20 19:12 ` Frank Haverkamp 2013-12-20 19:27 ` [PATCH] GenWQE: Accidently casting to u32 where u64 is required Frank Haverkamp 2014-01-07 6:41 ` [PATCH 1/2] GenWQE: Fix endian issues detected by sparse Dan Carpenter 2014-01-07 12:30 ` Frank Haverkamp [this message] 2014-01-07 12:45 ` Dan Carpenter 2014-01-07 14:39 ` Frank Haverkamp 2014-01-07 14:41 ` [PATCH 1/3] GenWQE: Rework return code for flash-update ioctl Frank Haverkamp 2014-01-07 14:41 ` [PATCH 2/3] GenWQE: Fix compile problems for Alpha Frank Haverkamp 2014-01-07 14:41 ` [PATCH 3/3] GenWQE: Fix warnings for sparc Frank Haverkamp 2013-12-20 15:26 ` [PATCH 2/2] GenWQE: Replace dynamic_hex_dump with print_hex_dump_debug Frank Haverkamp 2013-12-20 15:33 ` Greg KH 2013-12-20 15:49 ` Frank Haverkamp 2013-12-20 15:55 ` Greg KH
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=1389097816.15325.7.camel@oc7383187364.ibm.com \ --to=haver@linux.vnet.ibm.com \ --cc=dan.carpenter@oracle.com \ --cc=fengguang.wu@intel.com \ --cc=gregkh@linuxfoundation.org \ --cc=jim.epost@gmail.com \ --cc=kbuild-all@01.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-next@vger.kernel.org \ --cc=sfr@canb.auug.org.au \ --subject='Re: [PATCH 1/2] GenWQE: Fix endian issues detected by sparse' \ /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
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).